

A309776


Form a triangle: first row is n in base 2, next row is sums of pairs of adjacent digits of previous row, repeat until get a single number which is a(n).


1



0, 1, 1, 2, 1, 2, 3, 4, 1, 2, 4, 5, 4, 5, 7, 8, 1, 2, 5, 6, 7, 8, 11, 12, 5, 6, 9, 10, 11, 12, 15, 16, 1, 2, 6, 7, 11, 12, 16, 17, 11, 12, 16, 17, 21, 22, 26, 27, 6, 7, 11, 12, 16, 17, 21, 22, 16, 17, 21, 22, 26, 27, 31, 32, 1, 2, 7, 8, 16, 17, 22, 23, 21, 22
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,4


COMMENTS

a(n) = 1 occurs at n = 2^k for nonnegative integers k.


LINKS

Rémy Sigrist, Table of n, a(n) for n = 0..16384


FORMULA

From Bernard Schott, Sep 22 2019: (Start)
a(2^k + 1) = 2 for k >= 1 where 2^k+1 = 1000..0001_2.
a(2^k  1) = 2^(k1) for k >= 2 where 2^k1 = 111..111_2.
a((4^k1)/3) = 2^(2*k3) for k >= 2 where (4^k1)/3 = 10101..0101_2.
(End)


EXAMPLE

For n=5 the triangle is
1 0 1
1 1
2
so a(5)=2.
For n=14 we get
1 1 1 0
2 2 1
4 3
7
so a(14)=7.
For n=26=11010_2; (n1+n2, n2+n3, n3+n4, n4+n5) = 2111; (n1'+n2', n2'+n3', n3'+n4') = 322; (n1''+n2'', n2''+n3'') = 54; (n1'''+n2''') = 9; a(26)= 9.


PROG

(PARI) a(n) = my (b=binary(n)); sum(k=1, #b, b[k]*binomial(#b1, k1)) \\ Rémy Sigrist, Aug 20 2019


CROSSREFS

Cf. A306607.
Sequence in context: A233782 A233972 A169778 * A255560 A328472 A046653
Adjacent sequences: A309773 A309774 A309775 * A309777 A309778 A309779


KEYWORD

nonn,base


AUTHOR

Cameron Musard, Aug 16 2019


EXTENSIONS

Edited by N. J. A. Sloane, Sep 21 2019
Data corrected by Rémy Sigrist, Sep 22 2019


STATUS

approved



