login
A199238
n mod (number of ones in binary representation of n).
8
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,11
COMMENTS
a(A049445(n)) = 0;
a(n) = n - A161764(n);
a(A199262(n)) = n and a(m) <> n for m < A199262(n).
MATHEMATICA
Mod[#, DigitCount[#, 2, 1]]&/@Range[90] (* Harvey P. Dale, Nov 08 2011 *)
PROG
(Haskell)
a199238 n = a199238_list !! (n-1)
a199238_list = zipWith mod [1..] $ tail a000120_list
(PARI) A199238(n)=n%norml2(binary(n)) \\ M. F. Hasler, Oct 09 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Nov 04 2011
STATUS
approved