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.

A199238 n mod (number of ones in binary representation of n).

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 2, 3, 0, 1, 0, 1, 0, 0, 1, 3, 0, 1, 2, 3, 1, 1, 2, 1, 0, 1, 0, 2, 0, 1, 2, 3, 0, 2, 0, 3, 2, 1, 2, 2, 0, 1, 2, 3, 1, 1, 2, 0, 2, 1, 2, 4, 0, 1, 2, 3, 0, 1, 0, 1, 0, 0, 1, 3, 0, 1, 2, 3, 1, 1, 2, 4, 0, 0, 1, 3, 0, 1, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 04 2011

Keywords

Comments

a(A049445(n)) = 0;
a(n) = n - A161764(n);
a(A199262(n)) = n and a(m) <> n for m < A199262(n).

Crossrefs

Programs

  • Haskell
    a199238 n = a199238_list !! (n-1)
    a199238_list = zipWith mod [1..] $ tail a000120_list
    
  • Mathematica
    Mod[#,DigitCount[#,2,1]]&/@Range[90] (* Harvey P. Dale, Nov 08 2011 *)
  • PARI
    A199238(n)=n%norml2(binary(n))  \\ M. F. Hasler, Oct 09 2012