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!)
A059672 Sum of binary numbers with n 1's and one (possibly leading) 0. 3
0, 3, 14, 45, 124, 315, 762, 1785, 4088, 9207, 20470, 45045, 98292, 212979, 458738, 983025, 2097136, 4456431, 9437166, 19922925, 41943020, 88080363, 184549354, 385875945, 805306344, 1677721575, 3489660902, 7247757285, 15032385508 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 0..1000

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

FORMULA

a(n) = n*(2^(n+1)-1) = A058922(n+1) - n.

G.f.: x*(3-4*x)/((1-x)^2*(1-2*x)^2). - Colin Barker, Mar 21 2012

a(n) = Sum_{k=0..n} Sum_{i=0..n} C(n+1,i) - C(k,i). - Wesley Ivan Hurt, Sep 21 2017

EXAMPLE

a(4)=124 since the binary sum 11110+11101+11011+10111+01111 is 30+29+27+23+15.

MATHEMATICA

A059672[n_Integer] := n*(2^(n + 1) - 1); Table[A059672[n], {n, 0, 40}] (* Vladimir Joseph Stephan Orlovsky, Jul 22 2011 *)

LinearRecurrence[{6, -13, 12, -4}, {0, 3, 14, 45}, 40] (* Harvey P. Dale, Aug 30 2016 *)

PROG

(MAGMA) [n*(2^(n+1)-1): n in [0..35]]; // Vincenzo Librandi, Jul 23 2011

(PARI) a(n) =2*n<<n-n \\ Charles R Greathouse IV, Mar 21 2012

(PARI) x='x+O('x^99); concat(0, Vec(x*(3-4*x)/((1-x)^2*(1-2*x)^2))) \\ Altug Alkan, Apr 09 2016

CROSSREFS

Cf. A058922.

Sequence in context: A115005 A058389 A261481 * A302225 A032316 A032225

Adjacent sequences:  A059669 A059670 A059671 * A059673 A059674 A059675

KEYWORD

easy,nonn

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 June 15 15:16 EDT 2021. Contains 345049 sequences. (Running on oeis4.)