login
A321363
Single-digit odd primes and primes whose decimal expansion has the form iii...ij, where i and j are distinct odd digits.
0
3, 5, 7, 13, 17, 19, 31, 37, 53, 59, 71, 73, 79, 97, 113, 331, 337, 557, 773, 991, 997, 1117, 3331, 5557, 11113, 11117, 11119, 33331, 77773, 99991, 111119, 333331, 333337, 555557, 3333331, 9999991, 11111117, 11111119, 33333331, 55555553, 55555559, 111111113
OFFSET
1,1
MATHEMATICA
s={3, 5, 7}; Do[Do[Do[k=m*(10^n-1)/9*10+j; If[j!=m && PrimeQ[k], AppendTo[s, k]], {j, 1, 9, 2}], {m, 1, 9, 2}], {n, 1, 8}]; s (* Amiram Eldar, Nov 08 2018 *)
PROG
(PARI) lista(nn) = {print1("3, 5, 7, "); for (n=1, nn, r = (10^n-1)/9; forstep (i=1, 9, 2, forstep(j=1, 9, 2, if (i != j, if (isprime(p=fromdigits(concat(digits(r*i), j))), print1(p, ", ")); ); ); ); ); } \\ Michel Marcus, Nov 28 2018
KEYWORD
nonn,base
AUTHOR
Enrique Navarrete, Nov 07 2018
EXTENSIONS
a(35)-a(42) from Amiram Eldar, Nov 08 2018
STATUS
approved