OFFSET
0,3
COMMENTS
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
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..16384
Michael De Vlieger, Records and First Positions of Records of A113504.
EXAMPLE
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).
MATHEMATICA
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Leroy Quet, Jan 10 2006
EXTENSIONS
More terms from Reinhard Zumkeller, Jan 17 2006
STATUS
approved