OFFSET
0,5
COMMENTS
a(n) is the unique solution to x^3 == 9 (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 - 9 is divisible by 2^n, otherwise a(n-1) + 2^(n-1).
EXAMPLE
9^3 = 729 = 45*2^4 + 9;
25^3 = 15625 = 488*2^5 + 9 = 244*2^6 + 9 = 122*2^7 + 9 = 61*2^8 + 9;
281^3 = 22188041 = 43336*2^9 + 9 = 21668*2^10 + 9 = 10834*2^11 + 9 = 5417*2^12 + 9.
PROG
(PARI) a(n) = lift(sqrtn(9+O(2^n), 3))
CROSSREFS
KEYWORD
nonn
AUTHOR
Jianing Song, Aug 30 2019
STATUS
approved