A383979 a(n) is the number of n-digit terms in A383978.
0, 1, 15, 106, 821, 6909, 58683, 509654, 4508611, 40421003, 366300162, 3348975103, 30845805300, 285887726304, 2663962455651, 24939375901980
Offset: 1
Links
- Lyle Blosser, Python script
Programs
-
Mathematica
a[n_]:=Module[{count=0},For[k=Prime[PrimePi[10^(n-1)]+1], k<=Prime[PrimePi[10^n-1]],k=NextPrime[k],If[Part[d=IntegerDigits[k],l=IntegerLength[k]]==Part[d,l-1],count++]]; count]; Array[a,7]
-
Python
from sympy import isprime def a(n): if n < 3: return n-1 return sum(1 for i in range(10**(n-1), 10**n, 100) for k in (11, 33, 77, 99) if isprime(i+k)) print([a(n) for n in range(1, 10)]) # Michael S. Branicky, May 20 2025
Extensions
a(12) from Michael S. Branicky, May 20 2025
a(13) from Michael S. Branicky, May 27 2025
a(14)-a(15) from Lyle Blosser, Jul 09 2025
a(15) corrected by Lyle Blosser, Aug 09 2025
a(16) from Lyle Blosser, Aug 23 2025