OFFSET
0,3
COMMENTS
a(n) is the unique solution to x^3 == 3 (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 - 3 is divisible by 2^n, otherwise a(n-1) + 2^(n-1).
EXAMPLE
11^3 = 1331 = 83*2^4 + 3;
27^3 = 19683 = 615*2^5 + 3;
59^3 = 205379 = 3209*2^6 + 3.
PROG
(PARI) a(n) = lift(sqrtn(3+O(2^n), 3))
CROSSREFS
KEYWORD
nonn
AUTHOR
Jianing Song, Aug 30 2019
STATUS
approved