OFFSET
0,4
COMMENTS
a(n) is the unique solution to x^3 == 5 (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 - 5 is divisible by 2^n, otherwise a(n-1) + 2^(n-1).
EXAMPLE
13^3 = 2197 = 137*2^4 + 5;
29^3 = 24389 = 762*2^5 + 5 = 381*2^6 + 5;
93^3 = 804357 = 6284*2^7 + 5 = 3142*2^8 + 5 = 1571*2^9 + 5.
PROG
(PARI) a(n) = lift(sqrtn(5+O(2^n), 3))
CROSSREFS
KEYWORD
nonn
AUTHOR
Jianing Song, Aug 30 2019
STATUS
approved