OFFSET
0,3
COMMENTS
a(n) is the unique solution to x^3 == 7 (mod 2^n) in the range [0, 2^n - 1].
LINKS
Wikipedia, p-adic number
FORMULA
For n > 0, a(n) = a(n-1) if a(n-1)^3 - 7 is divisible by 2^n, otherwise a(n-1) + 2^(n-1).
EXAMPLE
7^3 = 343 = 21*2^4 + 7;
23^3 = 12167 = 380*2^5 + 7 = 190*2^6 + 7 = 95*2^7 + 7;
151^3 = 3442951 = 13449*2^8 + 7.
PROG
(PARI) a(n) = lift(sqrtn(7+O(2^n), 3))
CROSSREFS
KEYWORD
nonn
AUTHOR
Jianing Song, Aug 30 2019
STATUS
approved