login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A090889 Double partial sums of (n * its dyadic valuation). 1
0, 0, 2, 4, 14, 24, 40, 56, 96, 136, 186, 236, 310, 384, 472, 560, 712, 864, 1034, 1204, 1414, 1624, 1856, 2088, 2392, 2696, 3026, 3356, 3742, 4128, 4544, 4960, 5536, 6112, 6722, 7332, 8014, 8696, 9416, 10136, 10976, 11816, 12698, 13580 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Table of n, a(n) for n=0..43.

FORMULA

a(0)=0, a(2n) = 2a(n) + 2a(n-1) + n(n+1)(2n+1)/3, a(2n+1) = 4a(n) + 2/3*(n+1)(n+2)(n+3).

G.f.: 1/(1-x)^2 * sum(k>=0, 2^k*t^2/(1-t^2)^2, t=x^2^k).

PROG

(PARI) a(n)=sum(k=1, n, bitand(k, n-k)+k*(n-k))

(PARI) a(n)=if(n<1, 0, if(n%2==0, 2*a(n/2)+2*a(n/2-1)+n/2*(n/2+1)*(n+1)/3, 4*a((n-1)/2)+2/3*((n-1)/2)*((n-1)/2+1)*((n-1)/2+2)))

(PARI) a(n)=sum(l=0, n, sum(k=0, l, k*valuation(k, 2)))

CROSSREFS

A006851(n)+A000292(n-2). Cf. A007814.

Equals A006581(n) + A000292(n-2). Cf. A007814.

Sequence in context: A074716 A283290 A283379 * A096012 A261562 A102930

Adjacent sequences:  A090886 A090887 A090888 * A090890 A090891 A090892

KEYWORD

nonn,easy

AUTHOR

Ralf Stephan, Feb 13 2004

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 21 16:28 EST 2018. Contains 299414 sequences. (Running on oeis4.)