A088606 Smallest number k such that concatenation of k and prime(n) is a prime, or 0 if no other number exists. a(1) = a(3) = 0.
0, 1, 0, 1, 2, 1, 3, 4, 2, 2, 1, 1, 2, 4, 3, 3, 3, 4, 1, 2, 1, 1, 2, 3, 1, 5, 1, 5, 1, 2, 4, 2, 2, 4, 11, 1, 4, 1, 3, 6, 2, 1, 3, 1, 5, 6, 4, 1, 5, 1, 5, 2, 4, 2, 3, 6, 2, 3, 1, 2, 1, 2, 1, 2, 3, 6, 3, 4, 2, 4, 6, 3, 1, 1, 6, 2, 2, 4, 12, 1, 5, 4, 5, 1, 1, 5, 3, 3, 3, 3, 2, 5, 1, 3, 1, 2, 17, 2, 1, 3, 3, 2, 5, 5
Offset: 1
Programs
-
PARI
a(n) = if ((n==1) || (n==3), 0, my(k=1); while (!isprime(eval(Str(k, prime(n)))), k++); k); \\ Michel Marcus, Jul 11 2021
Extensions
More terms from Ray Chandler, Oct 18 2003
Comments