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.

A007958 Even numbers with at least one odd digit.

Original entry on oeis.org

10, 12, 14, 16, 18, 30, 32, 34, 36, 38, 50, 52, 54, 56, 58, 70, 72, 74, 76, 78, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162
Offset: 1

Views

Author

R. Muller

Keywords

Comments

Old name was: Even numbers such that some permutation of digits is an odd number.
a(n) = A179083(n) for n <= 30. - Reinhard Zumkeller, Jun 28 2010

Programs

  • Mathematica
    Select[2*Range[100],Or@@OddQ[IntegerDigits[#]]&] (* Harvey P. Dale, Apr 01 2013 *)
  • PARI
    is(n)=n%2==0 && vecsum(Set(digits(n)%2)) \\ Charles R Greathouse IV, Oct 23 2015
    
  • Python
    def ok(n): return n%2 == 0 and set(str(n)) & set("13579") != set()
    print(list(filter(ok, range(163)))) # Michael S. Branicky, Oct 12 2021

Formula

a(n) ~ 2n. - Charles R Greathouse IV, Oct 23 2015

Extensions

New name from Charles R Greathouse IV, Feb 14 2017, based on comment from Harvey P. Dale, Apr 01 2013