login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A113504 a(0) = 1. For n >= 1, a(n) = number of earlier terms of the sequence that have the same number of ones in their binary representations as n. 5

%I #24 Sep 06 2017 04:08:07

%S 1,1,2,0,3,1,1,0,5,2,2,0,2,0,0,0,8,2,2,0,2,0,0,0,2,0,0,0,0,0,0,0,13,2,

%T 2,1,2,1,1,0,2,1,1,0,1,0,0,0,2,1,1,0,1,0,0,0,1,0,0,0,0,0,0,0,28,2,2,2,

%U 2,2,2,0,2,2,2,0,2,0,0,0,2,2,2,0,2,0,0,0,2,0,0,0,0,0,0,0,2,2,2,0,2,0,0,0,2

%N a(0) = 1. For n >= 1, a(n) = number of earlier terms of the sequence that have the same number of ones in their binary representations as n.

%C A115211(n) = A000120(a(n)) = number of ones in binary representation of a(n) for n>0; record values: A115212(n) = a(A115213(n)). - _Reinhard Zumkeller_, Jan 17 2006

%H Michael De Vlieger, <a href="/A113504/b113504.txt">Table of n, a(n) for n = 0..16384</a>

%H Michael De Vlieger, <a href="/A113504/a113504.txt">Records and First Positions of Records of A113504</a>.

%e The first 8 terms (terms 0 through 7) written in binary are [1,1,10,0,11,1,1,0]. Term 8 gives the number of earlier terms with the same number of 1's in their binary representation as 8 (which is 1000 in binary, for one 1). a(8) = 5 because there are five terms among the earlier terms with one binary 1 (terms with one 1: 1, 1, 2, 1 and 1).

%t Block[{a = {{1}}}, Do[AppendTo[a, IntegerDigits[#, 2]] &@ Count[a, k_ /; Count[k, 1] == DigitCount[i, 2, 1]], {i, 104}]; FromDigits[#, 2] & /@ a] (* _Michael De Vlieger_, Sep 05 2017 *)

%o (PARI) lista(nn) = {vh = [1]; print1(1, ", "); for (n=1, nn, nb = #select(x->(x==hammingweight(n)), vh); print1(nb, ", "); vh = concat(vh, hammingweight(nb)););} \\ _Michel Marcus_, Sep 06 2017

%Y Cf. A000120, A113503, A115212, A115213.

%K nonn,base

%O 0,3

%A _Leroy Quet_, Jan 10 2006

%E More terms from _Reinhard Zumkeller_, Jan 17 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 10:07 EDT 2024. Contains 371905 sequences. (Running on oeis4.)