A302442 Number of primes of the form b^2-2 for b <= 10^n.
5, 26, 157, 1153, 8888, 72928, 615643, 5328644, 47034083, 420950239
Offset: 1
Examples
a(1) = 5 because there are 5 primes of the form b^2-2 for b <= 10 : 2, 7, 23, 47 and 79.
Crossrefs
Programs
-
PARI
{a(n) = sum(k=0, 10^n, isprime(k^2-2))}
-
Python
from sympy import isprime def aupton(terms): s, alst = 0, [] for n in range(1, terms+1): s += sum(isprime(b**2-2) for b in range(10**(n-1), 10**n)) alst.append(s) return alst print(aupton(6)) # Michael S. Branicky, May 26 2021
Extensions
a(10) from Jacques Tramu, Sep 14 2018
Comments