

A054844


Number of ways to write n as the sum of any number of consecutive integers (including the trivial oneterm sum n = n).


10



2, 2, 4, 2, 4, 4, 4, 2, 6, 4, 4, 4, 4, 4, 8, 2, 4, 6, 4, 4, 8, 4, 4, 4, 6, 4, 8, 4, 4, 8, 4, 2, 8, 4, 8, 6, 4, 4, 8, 4, 4, 8, 4, 4, 12, 4, 4, 4, 6, 6, 8, 4, 4, 8, 8, 4, 8, 4, 4, 8, 4, 4, 12, 2, 8, 8, 4, 4, 8, 8, 4, 6, 4, 4, 12, 4, 8, 8, 4, 4, 10, 4, 4, 8, 8, 4, 8, 4, 4, 12, 8, 4, 8, 4, 8, 4, 4, 6, 12, 6
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

a(n) = twice the number of odd divisors of n. That is, if d is the divisor function and q is the exponent of the largest power of 2 dividing n, then the a(n) equals 2*d(n)/(q+1).  Andrew Niedermaier, Jul 20 2003


LINKS

Antti Karttunen, Table of n, a(n) for n = 1..65537


FORMULA

a(n) = 2*A001227(n).  Andrew Niedermaier, Jul 20 2003
Moebius transform is period 2 sequence [2, 0, ...].  Michael Somos, Sep 20 2005
G.f.: Sum_{k>0} 2x^k/(1x^(2k)) = Sum_{k>0} 2x^(2k1)/(1x^(2k1)).  Michael Somos, Sep 20 2005


EXAMPLE

a(3) = 4 because 3 = (2)+(1)+0+1+2+3 or 0+1+2 or 1+2 or 3; a(13) = 4 because 13 = (12)+...+13 or (5)+...+7 or 6+7 or 13.


PROG

(PARI) a(n)=2*sumdiv(n, d, d%2)
(PARI) A054844(n) = (2*numdiv(n>>valuation(n, 2))); \\ Antti Karttunen, Sep 27 2018


CROSSREFS

Cf. A054843.
Sequence in context: A214212 A100008 A102763 * A057936 A033097 A036845
Adjacent sequences: A054841 A054842 A054843 * A054845 A054846 A054847


KEYWORD

easy,nonn


AUTHOR

Henry Bottomley, Apr 13 2000


EXTENSIONS

Corrected and extended by Michael Somos, Apr 26 2000


STATUS

approved



