login
The number of values of the digit k for which prime(n)*10+k is prime.
4

%I #9 Mar 25 2018 09:39:26

%S 2,2,2,3,1,3,2,4,2,1,3,2,1,3,1,0,2,3,2,1,2,1,1,0,2,2,3,0,3,0,2,1,1,1,

%T 2,1,2,1,0,1,0,1,1,2,2,3,2,2,1,2,2,2,2,0,1,1,2,3,1,1,2,1,1,1,1,0,2,2,

%U 0,2,2,1,3,2,2,1,0,0,2,3,0,3,0,2,2,0

%N The number of values of the digit k for which prime(n)*10+k is prime.

%H Colin Barker, <a href="/A240689/b240689.txt">Table of n, a(n) for n = 1..10000</a>

%e a(16) = 0 because prime(16) = 53, and 531, 533, 537 and 539 are not prime.

%e a(5) = 1 because prime(5) = 11, and 113 is prime, but 111, 117 and 119 are not prime.

%e a(1) = 2 because prime(1) = 2, and 23 and 29 are prime, but 21 and 27 are not prime.

%e a(4) = 3 because prime(4) = 7, and 71, 73 and 79 are prime, but 77 is not prime.

%e a(8) = 4 because prime(8) = 19, and 191, 193, 197 and 199 are all prime.

%t Count[#,_?PrimeQ]&/@Table[10*Prime[n]+k,{n,90},{k,{1,3,7,9}}] (* _Harvey P. Dale_, Mar 25 2018 *)

%o (PARI) forprime(p=2, 10000, t=0; forstep(k=1, 9, 2, if(isprime(p*10+k), t++)); print1(t, ", "))

%Y Cf. A067267, A119289, A240678, A240679, A240680.

%K nonn,base

%O 1,1

%A _Colin Barker_, Apr 10 2014