login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A320256
k-digit primes with the same even digit repeated k-1 times and a single odd digit.
2
3, 5, 7, 23, 29, 41, 43, 47, 61, 67, 83, 89, 223, 227, 229, 443, 449, 661, 881, 883, 887, 2221, 4441, 4447, 6661, 8887, 22229, 44449, 88883, 444443, 444449, 666667, 888887, 22222223, 66666667, 88888883, 222222227, 444444443, 666666667, 888888883, 888888887
OFFSET
1,1
COMMENTS
For the resulting number to be prime, the rightmost digit must be the odd one. - Michel Marcus, Oct 11 2018
LINKS
EXAMPLE
3, 5, 7 are in the sequence for k = 1.
229 is in the sequence because it is a 3-digit prime with the first 3-1 digits repeating even (2) and the last digit odd (9). - David A. Corneth, Oct 10 2018
MATHEMATICA
Join[{3, 5, 7}, Select[Flatten@ Table[{1, 3, 7, 9} + 10 FromDigits@ ConstantArray[k, n], {n, 9}, {k, Range[2, 8, 2]}], PrimeQ]] (* Michael De Vlieger, Oct 31 2018 *)
PROG
(PARI) first(n) = {n = max(n, 3); my(t = 3, res = List([3, 5, 7])); print1("3, 5, 7, "); for(i=1, oo, k=(10^i - 1) / 9; forstep(f = 2, 8, 2, forstep(d=1, 9, 2, c = 10 * f * k + d; if(isprime(c), print1(c", "); listput(res, c); t++; if(t>=n, return(res))))))} \\ David A. Corneth, Oct 10 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Enrique Navarrete, Oct 08 2018
EXTENSIONS
More terms from Michel Marcus, Oct 10 2018
STATUS
approved