This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A286877 #45 Jan 08 2025 11:03:04 %S A286877 0,4,38,2928,27493,1029745,23747457,313398285,3596107669,94280954402, %T A286877 450044583893,28673959190179,28673959190179,3524407382568745, %U A286877 13428985415474682,13428985415474682,42949774758062711577,91610966633729580058,6709533061724423693474 %N A286877 One of the two successive approximations up to 17^n for 17-adic integer sqrt(-1). Here the 4 (mod 17) case (except for n=0). %C A286877 x = ...GC5A24, %C A286877 x^2 = ...GGGGGG = -1. %H A286877 Seiichi Manyama, <a href="/A286877/b286877.txt">Table of n, a(n) for n = 0..813</a> %H A286877 Peter Bala, <a href="/A210850/a210850.pdf">Using Lucas polynomials to find the p-adic square roots of -1, -2 and -3</a>, Dec 2022. %H A286877 Wikipedia, <a href="https://en.wikipedia.org/wiki/Hensel%27s_lemma">Hensel's Lemma</a>. %F A286877 a(0) = 0 and a(1) = 4, a(n) = a(n-1) + 2 * (a(n-1)^2 + 1) mod 17^n for n > 1. %F A286877 a(n) == L(17^n,4) (mod 17^n) == (2 + sqrt(5))^(17^n) + (2 - sqrt(5))^(17^n) (mod 17^n), where L(n,x) denotes the n-th Lucas polynomial of A114525. - _Peter Bala_, Dec 02 2022 %e A286877 a(1) = ( 4)_17 = 4, %e A286877 a(2) = ( 24)_17 = 38, %e A286877 a(3) = ( A24)_17 = 2928, %e A286877 a(4) = (5A24)_17 = 27493. %o A286877 (Ruby) %o A286877 def A(k, m, n) %o A286877 ary = [0] %o A286877 a, mod = k, m %o A286877 n.times{ %o A286877 b = a % mod %o A286877 ary << b %o A286877 a = b ** m %o A286877 mod *= m %o A286877 } %o A286877 ary %o A286877 end %o A286877 def A286877(n) %o A286877 A(4, 17, n) %o A286877 end %o A286877 p A286877(100) %o A286877 (Python) %o A286877 def A(k, m, n): %o A286877 ary=[0] %o A286877 a, mod = k, m %o A286877 for i in range(n): %o A286877 b=a%mod %o A286877 ary.append(b) %o A286877 a=b**m %o A286877 mod*=m %o A286877 return ary %o A286877 def a286877(n): %o A286877 return A(4, 17, n) %o A286877 print(a286877(100)) # _Indranil Ghosh_, Aug 03 2017 %o A286877 (PARI) a(n) = truncate(sqrt(-1+O(17^n))); \\ _Michel Marcus_, Aug 04 2017 %Y A286877 The two successive approximations up to p^n for p-adic integer sqrt(-1): A048898 and A048899 (p=5), A286840 and A286841 (p=13), this sequence and A286878 (p=17). %K A286877 nonn,easy %O A286877 0,2 %A A286877 _Seiichi Manyama_, Aug 02 2017