cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A320256 k-digit primes with the same even digit repeated k-1 times and a single odd digit.

Original entry on oeis.org

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

Views

Author

Enrique Navarrete, Oct 08 2018

Keywords

Comments

For the resulting number to be prime, the rightmost digit must be the odd one. - Michel Marcus, Oct 11 2018

Examples

			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
		

Crossrefs

Programs

  • 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 *)
  • 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

Extensions

More terms from Michel Marcus, Oct 10 2018