OFFSET
1,2
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..10000
EXAMPLE
When considering the first 14 terms of the sequence, a(13) = 31 has the greatest number of 1's in its binary representation, 5 ones. So a(15) = a(14) + 5 = 41.
MAPLE
A000120 := proc(n) local br, i; br := convert(n, base, 2); sum(op(i, br), i=1..nops(br)); end: A120367 := proc(nmax) local a, bmax, anew; a := [1]; bmax := 1; while nops(a) < nmax do anew := op(-1, a)+bmax; a := [op(a), anew]; bmax := max(bmax, A000120(anew)); od; RETURN(a); end; print(A120367(80) ); # R. J. Mathar, Dec 16 2006
MATHEMATICA
mx1 = 1; NestList[# + (mx1 = Max[Total@IntegerDigits[#, 2], mx1]) &, 1, 60] (* Ivan Neretin, May 17 2018 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Leroy Quet, Jun 26 2006
EXTENSIONS
More terms from R. J. Mathar, Dec 16 2006
STATUS
approved