OFFSET
0,2
COMMENTS
x = ...554044,
x^2 = ...666662 = -5.
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..1183
Wikipedia, Hensel's Lemma.
FORMULA
a(0) = 0 and a(1) = 4, a(n) = a(n-1) + 6 * (a(n-1)^2 + 5) mod 7^n for n > 1.
If n > 0, a(n) = 7^n - A290806(n).
EXAMPLE
a(1) = 4_7 = 4,
a(2) = 44_7 = 32,
a(3) = 44_7 = 32,
a(4) = 4044_7 = 1404.
PROG
(PARI) a(n) = if (n, 7^n - truncate(sqrt(-5+O(7^(n)))), 0)
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Aug 11 2017
STATUS
approved