OFFSET
0,2
COMMENTS
a(n) is the unique number k in [1, 5^n] and congruent to 4 mod 5 such that k^2 + 9 is divisible by 5^n.
LINKS
Robert Israel, Table of n, a(n) for n = 0..1424
G. P. Michon, Introduction to p-adic integers, Numericana.
FORMULA
a(1) = 4; 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 - A327302(n).
EXAMPLE
The unique number k in {4, 9, 14, 19, 24} such that k^2 + 9 is divisible by 25 is k = 4, so a(2) = 4.
The unique number k in {4, 29, 54, 79, 104} such that k^2 + 9 is divisible by 125 is k = 79, so a(3) = 46.
The unique number k in {79, 204, 329, 454, 579} such that k^2 + 9 is divisible by 625 is k = 79, so a(4) = 79.
MAPLE
R:= [padic:-rootp(x^2+9, 5, 101)]:
R:= op(select(t -> padic:-ratvaluep(t, 1)=4, R)):
seq(padic:-ratvaluep(R, n), n=0..100); # Robert Israel, Jan 16 2023
PROG
(PARI) a(n) = truncate(-sqrt(-9+O(5^n)))
CROSSREFS
Approximations of 5-adic square roots:
A327302, this sequence (sqrt(-9));
KEYWORD
nonn
AUTHOR
Jianing Song, Sep 16 2019
STATUS
approved