OFFSET
1,1
EXAMPLE
a(1) = 2 because 19 is prime and 19 has 2 digits.
a(2) = 8 because 31975319 is prime and 31975319 has 8 digits.
MATHEMATICA
s = 0; Do[s = s + 10^n*Switch[ Mod[n, 5], 1, 1, 2, 3, 3, 5, 4, 7, 0, 9]; If[ PrimeQ[s], Print[n + 1]], {n, 0, 3000}] (* Robert G. Wilson v, Feb 10 2004 *)
PROG
(PARI) test9(n)= s=0; for(i=0, n, if(Mod(i, 5)==0, s=s+9*10^i, if(Mod(i, 5)==1, s=s+1*10^i, if(Mod(i, 5)==2, s=s+3*10^i, if(Mod(i, 5)==3, s=s+5*10^i, if(Mod(i, 5)==4, s=s+7*10^i, )))))); return(s);
for(j=0, 732, if(isprime(test9(j)), print1(j+1, ", ")))
CROSSREFS
KEYWORD
hard,nonn,base,more,less
AUTHOR
mohammed bouayoun (bouyao(AT)wanadoo.fr), Feb 03 2004
EXTENSIONS
a(6) from Robert G. Wilson v, Feb 10 2004
a(7) from Donovan Johnson, Mar 06 2008
Offset changed to 1 and a(8) from Michael S. Branicky, May 27 2023
STATUS
approved