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.

A089648 Numbers whose numbers of zeros and ones in binary representation differ at most by 1.

Original entry on oeis.org

0, 1, 2, 4, 5, 6, 9, 10, 12, 17, 18, 19, 20, 21, 22, 24, 25, 26, 28, 35, 37, 38, 41, 42, 44, 49, 50, 52, 56, 67, 69, 70, 71, 73, 74, 75, 76, 77, 78, 81, 82, 83, 84, 85, 86, 88, 89, 90, 92, 97, 98, 99, 100, 101, 102, 104, 105, 106, 108, 112, 113, 114, 116, 120, 135, 139
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 02 2004

Keywords

Comments

A031443 is a subsequence; abs(A037861(a(n))) <= 1.

Crossrefs

Cf. A037861, union of A031443, A031444 and A031448.

Programs

  • Haskell
    a089648 n = a089648_list !! (n-1)
    a089648_list = filter ((<= 1) . abs . a037861) [0..]
    -- Reinhard Zumkeller, Mar 31 2015
  • Mathematica
    Select[Range[0,7! ],Abs[DigitCount[ #,2,0]-DigitCount[ #,2,1]]<2 &] (* Vladimir Joseph Stephan Orlovsky, Feb 16 2010 *)