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.

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

This page as a plain text file.
%I A286841 #48 Dec 04 2022 13:06:28
%S A286841 0,8,99,1958,28322,228249,2827300,55922199,808904403,9781942334,
%T A286841 52199939826,603633907222,11356596271444,11356596271444,
%U A286841 1828607235824962,37264994707118563,651495710876207647,5974828584341646375,49226908181248336040
%N A286841 One of the two successive approximations up to 13^n for 13-adic integer sqrt(-1). Here the 8 (mod 13) case (except for n=0).
%H A286841 Seiichi Manyama, <a href="/A286841/b286841.txt">Table of n, a(n) for n = 0..899</a>
%H A286841 Wikipedia, <a href="https://en.wikipedia.org/wiki/Hensel%27s_lemma">Hensel's Lemma</a>.
%F A286841 If n > 0, a(n) = 13^n - A286840(n).
%F A286841 a(0) = 0 and a(1) = 8, a(n) = a(n-1) + 4 * (a(n-1)^2 + 1) mod 13^n for n > 1.
%F A286841 a(n) == L(13^n,8) (mod 13^n) == (4 + sqrt(17))^(13^n) + (4 - sqrt(17))^(13^n) (mod 13^n), where L(n,x) denotes the n-th Lucas polynomial of A114525. - _Peter Bala_, Nov 20 2022
%t A286841 {0}~Join~Table[#&@@Select[PowerModList[-1, 1/2, 13^k], Mod[#, 13] == 8 &], {k, 18}] (* _Giorgos Kalogeropoulos_, Oct 22 2022 *)
%o A286841 (Ruby)
%o A286841 def A(k, m, n)
%o A286841   ary = [0]
%o A286841   a, mod = k, m
%o A286841   n.times{
%o A286841     b = a % mod
%o A286841     ary << b
%o A286841     a = b ** m
%o A286841     mod *= m
%o A286841   }
%o A286841   ary
%o A286841 end
%o A286841 def A286841(n)
%o A286841   A(8, 13, n)
%o A286841 end
%o A286841 p A286841(100)
%o A286841 (Python)
%o A286841 def A(k, m, n):
%o A286841     ary=[0]
%o A286841     a, mod = k, m
%o A286841     for i in range(n):
%o A286841           b=a%mod
%o A286841           ary.append(b)
%o A286841           a=b**m
%o A286841           mod*=m
%o A286841     return ary
%o A286841 def a286841(n):
%o A286841     return A(8, 13, n)
%o A286841 print(a286841(100)) # _Indranil Ghosh_, Aug 03 2017, after Ruby
%o A286841 (PARI) a(n) = if (n, 13^n - truncate(sqrt(-1+O(13^n))), 0); \\ _Michel Marcus_, Aug 04 2017
%Y A286841 The two successive approximations up to p^n for p-adic integer sqrt(-1): A048898 and A048899 (p=5), A286840 and this sequence (p=13), A286877 and A286878 (p=17).
%Y A286841 Cf. A114525, A286839.
%K A286841 nonn,easy
%O A286841 0,2
%A A286841 _Seiichi Manyama_, Aug 01 2017