login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

For n>0, a(n) = sum of n-th row of the triangle in A164874. [Reinhard Zumkeller, Aug 29 2009]

LINKS

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

Index entries for linear recurrences with constant coefficients, signature (6, -13, 12, -4).

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

Adjacent sequences:  A059670 A059671 A059672 * A059674 A059675 A059676

KEYWORD

easy,nonn,base

AUTHOR

Henry Bottomley, Feb 05 2001

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 24 23:25 EDT 2021. Contains 346273 sequences. (Running on oeis4.)