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.

A302442 Number of primes of the form b^2-2 for b <= 10^n.

This page as a plain text file.
%I A302442 #32 May 26 2021 08:44:42
%S A302442 5,26,157,1153,8888,72928,615643,5328644,47034083,420950239
%N A302442 Number of primes of the form b^2-2 for b <= 10^n.
%C A302442 From _Jacques Tramu_, Sep 13 2018: (Start)
%C A302442 Table C(i) = a(i)/pi(10^i) = a(i)/A000720(10^i)
%C A302442 a(1)  =         5         C(1)  = 1.25000000
%C A302442 a(2)  =        26         C(2)  = 1.04000000
%C A302442 a(3)  =       157         C(3)  = 0.93452381
%C A302442 a(4)  =      1153         C(4)  = 0.93816111
%C A302442 a(5)  =      8888         C(5)  = 0.92660550
%C A302442 a(6)  =     72928         C(6)  = 0.92904278
%C A302442 a(7)  =    615643         C(7)  = 0.92636541
%C A302442 a(8)  =   5328644         C(8)  = 0.92487818
%C A302442 a(9)  =  47034083         C(9)  = 0.92500224
%C A302442 a(10) = 420950239         C(10) = 0.92505860
%C A302442 (End)
%e A302442 a(1) = 5 because there are 5 primes of the form b^2-2 for b <= 10 : 2, 7, 23, 47 and 79.
%o A302442 (PARI) {a(n) = sum(k=0, 10^n, isprime(k^2-2))}
%o A302442 (Python)
%o A302442 from sympy import isprime
%o A302442 def aupton(terms):
%o A302442   s, alst = 0, []
%o A302442   for n in range(1, terms+1):
%o A302442     s += sum(isprime(b**2-2) for b in range(10**(n-1), 10**n))
%o A302442     alst.append(s)
%o A302442   return alst
%o A302442 print(aupton(6)) # _Michael S. Branicky_, May 26 2021
%Y A302442 Number of primes of the form b^2+m for b <= 10^n: A302443 (m=-3), this sequence (m=-2), A206709 (m=1), A302434 (m=2), A302435 (m=3).
%Y A302442 Cf. A028871.
%K A302442 nonn,more
%O A302442 1,1
%A A302442 _Seiichi Manyama_, Apr 08 2018
%E A302442 a(10) from _Jacques Tramu_, Sep 14 2018