login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A321281
a(n) is the number of primes of the form p*10^n + q, where p, q are the digits from 1 to 9.
1
21, 15, 13, 8, 9, 5, 3, 8, 8, 2, 2, 3, 2, 0, 2, 2, 2, 3, 2, 5, 1, 4, 0, 3, 1, 1, 1, 2, 2, 0, 2, 0, 0, 0, 2, 2, 1, 1, 3, 1, 0, 2, 0, 0, 3, 2, 0, 0, 1, 0, 0, 1, 1, 0, 1, 2, 2, 1, 0, 2, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1
OFFSET
1,1
LINKS
Sabin Tabirca and Kieran Reynolds, Lacunary Prime Numbers.
EXAMPLE
a(6) = 5 because there are five primes of the form p*10^6 + q where p, q are the digits from 1 to 9: 1000003, 2000003, 7000003, 7000009, 8000009.
MAPLE
f:= n -> nops(select(isprime, [seq(seq(p*10^n+q, p=1..9), q=[1, 3, 7, 9])])):
map(f, [$1..100]); # Robert Israel, Nov 14 2018
MATHEMATICA
a[n_]:=(c=0; Do[ Do[ If[PrimeQ[i*10^n+j], c++], {i, 1, 9}], {j, 1, 9, 2}]; c); Array[a, 20] (* Amiram Eldar, Nov 14 2018 *)
PROG
(PARI) a(n)={my(t=10^n); sum(i=1, 9, sum(j=1, 5, isprime(2*j-1+i*t)))} \\ Andrew Howroyd, Nov 10 2018
CROSSREFS
Cf. A000040.
Sequence in context: A068015 A040422 A214037 * A048933 A142590 A346064
KEYWORD
nonn,base
AUTHOR
Anton Deynega, Nov 10 2018
EXTENSIONS
a(16)-a(86) from Andrew Howroyd, Nov 10 2018
STATUS
approved