login
Primes of the form n*10^x+n+1, where 0 < n < 9, x=0,1,2..
0

%I #9 Jul 09 2020 14:08:35

%S 3,5,7,11,13,17,23,67,89,607,809,2003,6007,8009,200003,2000003,

%T 8000009,20000003,600000007,6000000007,2000000000003,8000000000009,

%U 20000000000000003,200000000000000003,60000000000000000007

%N Primes of the form n*10^x+n+1, where 0 < n < 9, x=0,1,2..

%e n=2,x=3. a(x,n) = 2*10^3+2+1 = 2003 prime.

%t Select[Union[Flatten[Table[n*10^x+n+1,{n,8},{x,0,20}]]],PrimeQ] (* _Harvey P. Dale_, Jul 09 2020 *)

%o (PARI) n10np1(n) = { local(x,y,k); for(x=0,n, for(k=1,8, y=10^x*k+k+1; if(isprime(y),print1(y",")) ) ) }

%K nonn

%O 1,1

%A _Cino Hilliard_, Jul 10, 2005