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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A107659 a(n) = Sum_{k=0..n} 2^max(k, n-k). 3
1, 4, 10, 24, 52, 112, 232, 480, 976, 1984, 4000, 8064, 16192, 32512, 65152, 130560, 261376, 523264, 1047040, 2095104, 4191232, 8384512, 16771072, 33546240, 67096576, 134201344, 268410880, 536838144, 1073692672, 2147418112 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Define an infinite array by m(n,k) = 2^n-n+k for n>=k>=0 (in the lower left triangle) and by m(n,k) = 2^k+k-n for k>=n>=0 (in the upper right triangle). The antidiagonal sums of this array are a(n) = sum_{k=0..n} m(n-k,k). - J. M. Bergot, Aug 16 2013

LINKS

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

Index entries for linear recurrences with constant coefficients, signature (2,2,-4).

FORMULA

a(2n) = 2^n(2^(n+2)-3), a(2n+1) = 2^n(2^(n+3)-4).

G.f.: (1+2*x)/[(1-2*x)*(1-2*x^2)].

a(n) = A122746(n) +2*A122746(n-1). - R. J. Mathar, Aug 16 2013

a(0)=1, a(1)=4, a(2)=10, a(n)=2*a(n-1)+2*a(n-2)-4*a(n-3). - Harvey P. Dale, Nov 10 2013

a(n) = 2^(n+2) - (2 + mod(n+1, 2)) * 2^floor((n+1)/2). - Michael Somos, Jun 24 2018

a(n) = - (2^(n+2)) * A052955(-n-3) for all n in Z. - Michael Somos, Jun 24 2018

EXAMPLE

G.f. = 1 + 4*x + 10*x^2 + 24*x^3 + 52*x^4 + 112*x^5 + 232*x^6 + 480*x^7 + ... - Michael Somos, Jun 24 2018

MATHEMATICA

Table[Sum[2^Max[k, n-k], {k, 0, n}], {n, 0, 30}] (* or *) LinearRecurrence[ {2, 2, -4}, {1, 4, 10}, 30] (* Harvey P. Dale, Nov 10 2013 *)

a[ n_] := 2^(n + 2) - (2 + Mod[n + 1, 2]) 2^Quotient[n + 1, 2]; (* Michael Somos, Jun 24 2018 *)

PROG

(PARI) {a(n) = 2^(n+2) - (2 + (n+1)%2) * 2^((n+1)\2)}; /* Michael Somos, Jun 24 2018 */

CROSSREFS

Cf. A027383, A052955.

Sequence in context: A093831 A274582 A052365 * A162588 A280541 A080615

Adjacent sequences:  A107656 A107657 A107658 * A107660 A107661 A107662

KEYWORD

nonn,easy

AUTHOR

Mitch Harris

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 April 20 17:54 EDT 2019. Contains 322310 sequences. (Running on oeis4.)