cp's OEIS Frontend

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.

A286878 One of the two successive approximations up to 17^n for 17-adic integer sqrt(-1). Here the 13 (mod 17) case (except for n=0).

This page as a plain text file.
%I A286878 #37 Mar 21 2021 13:00:34
%S A286878 0,13,251,1985,56028,390112,390112,96940388,3379649772,24306922095,
%T A286878 1565949316556,5597937117454,553948278039582,6380170650337192,
%U A286878 154948841143926247,2848994066094341111,5711417117604156904,735629295252607184119,7353551390343301297535
%N A286878 One of the two successive approximations up to 17^n for 17-adic integer sqrt(-1). Here the 13 (mod 17) case (except for n=0).
%C A286878 x   = ...04B6ED,
%C A286878 x^2 = ...GGGGGG = -1.
%H A286878 Seiichi Manyama, <a href="/A286878/b286878.txt">Table of n, a(n) for n = 0..812</a>
%H A286878 Wikipedia, <a href="https://en.wikipedia.org/wiki/Hensel%27s_lemma">Hensel's Lemma</a>.
%F A286878 If n > 0, a(n) = 17^n - A286877(n).
%F A286878 a(0) = 0 and a(1) = 13, a(n) = a(n-1) + 15 * (a(n-1)^2 + 1) mod 17^n for n > 1.
%e A286878 a(1) = (   D)_17 = 13,
%e A286878 a(2) = (  ED)_17 = 251,
%e A286878 a(3) = ( 6ED)_17 = 1985,
%e A286878 a(4) = (B6ED)_17 = 56028.
%o A286878 (Ruby)
%o A286878 def A(k, m, n)
%o A286878   ary = [0]
%o A286878   a, mod = k, m
%o A286878   n.times{
%o A286878     b = a % mod
%o A286878     ary << b
%o A286878     a = b ** m
%o A286878     mod *= m
%o A286878   }
%o A286878   ary
%o A286878 end
%o A286878 def A286878(n)
%o A286878   A(13, 17, n)
%o A286878 end
%o A286878 p A286878(100)
%o A286878 (Python)
%o A286878 def A(k, m, n):
%o A286878       ary=[0]
%o A286878       a, mod = k, m
%o A286878       for i in range(n):
%o A286878           b=a%mod
%o A286878           ary.append(b)
%o A286878           a=b**m
%o A286878           mod*=m
%o A286878       return ary
%o A286878 def a286878(n): return A(13, 17, n)
%o A286878 print(a286878(100)) # _Indranil Ghosh_, Aug 03 2017, after Ruby
%o A286878 (PARI) a(n) = if (n, 17^n-truncate(sqrt(-1+O(17^n))), 0); \\ _Michel Marcus_, Aug 04 2017
%Y A286878 The two successive approximations up to p^n for p-adic integer sqrt(-1): A048898 and A048899 (p=5), A286840 and A286841 (p=13), A286877 and this sequence (p=17).
%K A286878 nonn
%O A286878 0,2
%A A286878 _Seiichi Manyama_, Aug 02 2017