OFFSET
0,2
COMMENTS
x = ...410615,
x^2 = ...666664 = -3.
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..1183
Peter Bala, Using Lucas polynomials to find the p -adic square roots of -1, -2 and -3, Dec 2022.
Wikipedia, Hensel's Lemma.
FORMULA
a(0) = 0 and a(1) = 5, a(n) = a(n-1) + 2 * (a(n-1)^2 + 3) mod 7^n for n > 1.
If n > 0, a(n) = 7^n - A290803(n).
a(n) = L(7^n,5) (mod 7^n) = ( ((5 + sqrt(29))/2)^(7^n) + ((5 - sqrt(29))/2)^(7^n) ) (mod 7^n), where L(n,x) denotes the n-th Lucas polynomial of A114525. - Peter Bala, Nov 28 2022
EXAMPLE
a(1) = 5_7 = 5,
a(2) = 15_7 = 12,
a(3) = 615_7 = 306,
a(4) = 615_7 = 306,
a(5) = 10615_7 = 2707.
PROG
(PARI) a(n) = if (n, 7^n - truncate(sqrt(-3+O(7^(n)))), 0)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Aug 11 2017
STATUS
approved