login
A157845
a(0) = 1, a(n) = sum of binary digits of all prior terms, expressed in binary.
3
1, 1, 10, 11, 101, 111, 1010, 1100, 1110, 10001, 10011, 10110, 11001, 11100, 11111, 100100, 100110, 101001, 101100, 101111, 110100, 110111, 111100, 1000000, 1000001, 1000011, 1000110, 1001001, 1001100, 1001111, 1010100, 1010111, 1011100, 1100000, 1100010
OFFSET
0,3
COMMENTS
Equals A230297 = A010062 converted from decimal to binary, prefixed by another initial 1. - M. F. Hasler, Nov 18 2019
LINKS
FORMULA
a(n) = A230297(n-1) = A007088(A010062(n-1)) = A007088(A092391(A028897(a(n-1)))) for n > 0. - M. F. Hasler, Nov 18 2019
MAPLE
b:= proc(n) option remember; `if`(n<2, 1, b(n-1)+
add(i, i=convert(a(n-1), base, 10)))
end:
a:= n-> convert(b(n), binary):
seq(a(n), n=0..44); # Alois P. Heinz, Nov 18 2019
MATHEMATICA
s[0] = s[1] = 1; s[n_] := s[n] = s[n-1] + DigitCount[s[n-1], 2, 1]; Table[FromDigits[IntegerDigits[s[n], 2]], {n, 0, 50}] (* Amiram Eldar, Jul 28 2023 *)
PROG
(PARI) lista(nn) = {my(s = 1); my(t = 1); print1(t, ", "); for (i=1, nn, sb = binary(s); t = subst(Pol(sb), x, 10); print1(t, ", "); s += hammingweight(sb); ); }
(PARI) apply( A157845(n)=fromdigits(binary(A010062(n-!!n))), [0..40]) \\ M. F. Hasler, Nov 18 2019
CROSSREFS
Cf. A004207 (base-10 analog); A007088 (n in binary), A010062 (this written in base 10), A000120 (Hammingweight), A092391 (A000120(n) + n), A028897 (convert binary to decimal).
Sequence in context: A037090 A171676 A118240 * A230297 A086084 A206073
KEYWORD
base,easy,nonn
AUTHOR
Oliver K. Seet, Mar 07 2009
EXTENSIONS
a(11) corrected and extended by R. J. Mathar, Mar 12 2009
More terms from Michel Marcus, Apr 19 2014
STATUS
approved