login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


A059673
Sum of binary numbers with n 1's and one (non-leading) 0.
4
0, 2, 11, 38, 109, 284, 699, 1658, 3833, 8696, 19447, 42998, 94197, 204788, 442355, 950258, 2031601, 4325360, 9175023, 19398638, 40894445, 85983212, 180355051, 377487338, 788529129, 1644167144, 3422552039, 7113539558, 14763950053
OFFSET
0,2
COMMENTS
For n>0, a(n) = sum of n-th row of the triangle in A164874. [Reinhard Zumkeller, Aug 29 2009]
FORMULA
a(n) = (2n-1)*2^n+1-n.
G.f.: -x*(2*x^2+x-2) / ((x-1)^2*(2*x-1)^2). - Colin Barker, Sep 14 2014
a(0)=0, a(1)=2, a(2)=11, a(3)=38, a(n)=6*a(n-1)-13*a(n-2)+ 12*a(n-3)- 4*a(n-4). - Harvey P. Dale, May 17 2015. [This is equivalent to the g.f. -x*(2*x^2+x-2) / ((x-1)^2*(2*x-1)^2) given by Colin Barker. - N. J. A. Sloane, May 17 2015]
EXAMPLE
a(4)=109 since the binary sum 11110+11101+11011+10111 is 30+29+27+23.
MAPLE
A059673:=n->(2*n-1)*2^n+1-n: seq(A059673(n), n=0..50); # Wesley Ivan Hurt, Apr 24 2017
MATHEMATICA
Table[Total[FromDigits[#, 2]&/@Rest[Permutations[PadRight[{0}, n, 1]]]], {n, 30}] (* or *) LinearRecurrence[{6, -13, 12, -4}, {0, 2, 11, 38}, 30] (* Harvey P. Dale, May 17 2015 *)
PROG
(PARI) concat(0, Vec(-x*(2*x^2+x-2)/((x-1)^2*(2*x-1)^2) + O(x^100))) \\ Colin Barker, Sep 14 2014
CROSSREFS
Cf. A030130, A164874. [From Reinhard Zumkeller, Aug 29 2009]
Sequence in context: A079009 A097651 A320540 * A294152 A196701 A196850
KEYWORD
easy,nonn,base
AUTHOR
Henry Bottomley, Feb 05 2001
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 20 21:06 EDT 2024. Contains 376078 sequences. (Running on oeis4.)