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).

This page as a plain text file.
%I A199238 #19 Nov 05 2022 04:34:50
%S A199238 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,
%T A199238 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,
%U A199238 0,1,3,0,1,2,3,1,1,2,4,0,0,1,3,0,1,2
%N A199238 n mod (number of ones in binary representation of n).
%C A199238 a(A049445(n)) = 0;
%C A199238 a(n) = n - A161764(n);
%C A199238 a(A199262(n)) = n and a(m) <> n for m < A199262(n).
%H A199238 Reinhard Zumkeller, <a href="/A199238/b199238.txt">Table of n, a(n) for n = 1..10000</a>
%H A199238 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%t A199238 Mod[#,DigitCount[#,2,1]]&/@Range[90] (* _Harvey P. Dale_, Nov 08 2011 *)
%o A199238 (Haskell)
%o A199238 a199238 n = a199238_list !! (n-1)
%o A199238 a199238_list = zipWith mod [1..] $ tail a000120_list
%o A199238 (PARI) A199238(n)=n%norml2(binary(n))  \\ _M. F. Hasler_, Oct 09 2012
%Y A199238 Cf. A000120, A070635, A049445, A161764, A199262.
%K A199238 nonn
%O A199238 1,11
%A A199238 _Reinhard Zumkeller_, Nov 04 2011