OFFSET
0,3
COMMENTS
a(n) is the unique number k in [1, 5^n] and congruent to 1 mod 5 such that k^2 + 9 is divisible by 5^n.
LINKS
G. P. Michon, Introduction to p-adic integers, Numericana.
FORMULA
a(1) = 1; for n >= 2, a(n) is the unique number k in {a(n-1) + m*5^(n-1) : m = 0, 1, 2, 3, 4} such that k^2 + 9 is divisible by 5^n.
For n > 0, a(n) = 5^n - A327303(n).
EXAMPLE
The unique number k in {1, 6, 11, 16, 21} such that k^2 + 9 is divisible by 25 is k = 21, so a(2) = 21.
The unique number k in {21, 46, 71, 96, 121} such that k^2 + 9 is divisible by 125 is k = 46, so a(3) = 46.
The unique number k in {46, 171, 296, 421, 546} such that k^2 + 9 is divisible by 625 is k = 546, so a(4) = 546.
PROG
(PARI) a(n) = truncate(sqrt(-9+O(5^n)))
CROSSREFS
Approximations of 5-adic square roots:
this sequence, A327303 (sqrt(-9));
KEYWORD
nonn
AUTHOR
Jianing Song, Sep 16 2019
STATUS
approved