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.

A117076 Prime numbers with more even digits than odd digits.

Original entry on oeis.org

2, 223, 227, 229, 241, 263, 269, 281, 283, 401, 409, 421, 443, 449, 461, 463, 467, 487, 601, 607, 641, 643, 647, 661, 683, 809, 821, 823, 827, 829, 863, 881, 883, 887, 2003, 2027, 2029, 2063, 2069, 2081, 2083, 2087, 2089, 2203, 2207, 2221, 2243, 2267, 2269
Offset: 1

Views

Author

Andy Edwards, Apr 18 2006

Keywords

Comments

If a prime number's even digits are to outnumber its odd digits, it may not have two digits (as its last digit must be odd.) Neither may it begin with an odd digit if it has three or four digits. The smallest member of this sequence to begin with an odd digit is 10007.

Examples

			64969 is a member of this sequence as it is a prime with 3 even and only two odd digits. The primes on either side of it - 64951 and 64997 - are both non-members.
		

Programs

  • Mathematica
    Select[Prime[Range[1000]],Sum[DigitCount[ # ][[2i - 1]], {i, 1,5}] < Sum[DigitCount[ # ][[2i]], {i, 1, 5}] &] (* Stefan Steinerberger, Apr 18 2006 *)
    metoQ[n_]:=Module[{idn=IntegerDigits[n]},Count[idn,?EvenQ]>Count[idn, ?OddQ]]; Select[Prime[Range[350]],metoQ] (* Harvey P. Dale, Oct 10 2018 *)
  • PARI
    select( {is_A117076(n)=isprime(n)&&vecsum(n=digits(n)%2)*2<#n}, primes(500)) \\ M. F. Hasler, Jul 03 2022

Extensions

More terms from Stefan Steinerberger, Apr 18 2006