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.

A384016 a(n) is the number of n-digit terms in A384015.

This page as a plain text file.
%I A384016 #29 Aug 30 2025 21:51:40
%S A384016 0,1,0,0,74,673,5851,50977,451608,4048657,36675547,335269867,
%T A384016 3087739250,28615970101,266630103368,2495975596632
%N A384016 a(n) is the number of n-digit terms in A384015.
%t A384016 a[1]:=0; 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] &&Part[d,1]==Part[d,2],count++]]; count]; Array[a,7]
%o A384016 (Python)
%o A384016 from sympy import isprime
%o A384016 def a(n):
%o A384016     if n < 3: return n-1
%o A384016     return sum(1 for i in range(1, 10) for j in range(i*11*10**(n-2), (i*11+1)*10**(n-2), 100) for k in (11, 33, 77, 99) if isprime(j+k))
%o A384016 print([a(n) for n in range(1, 10)]) # _Michael S. Branicky_, May 19 2025
%Y A384016 Cf. A383979, A384014, A384015.
%K A384016 nonn,base,more,changed
%O A384016 1,5
%A A384016 _Stefano Spezia_, May 17 2025
%E A384016 a(11) from _David Radcliffe_, May 18 2025
%E A384016 a(12)-a(13) from _Michael S. Branicky_, May 19 2025
%E A384016 a(14) from _Michael S. Branicky_, May 22 2025
%E A384016 a(15) from _Lyle Blosser_, Aug 24 2025
%E A384016 a(16) from _Lyle Blosser_, Aug 30 2025