cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A232603 a(n) = 2^n * Sum_{k=0..n} k^p*q^k, where p=2, q=-1/2.

Original entry on oeis.org

0, -1, 2, -5, 6, -13, 10, -29, 6, -69, -38, -197, -250, -669, -1142, -2509, -4762, -9813, -19302, -38965, -77530, -155501, -310518, -621565, -1242554, -2485733, -4970790, -9942309, -19883834, -39768509, -79536118
Offset: 0

Views

Author

Stanislav Sykora, Nov 27 2013

Keywords

Comments

The factor 2^n (i.e., |1/q|^n) is present to keep the values integer.
See also A232600 and references therein for integer values of q.

Examples

			a(3) = 2^3 * [0^2/2^0 - 1^2/2^1 + 2^2/2^2 - 3^2/2^3] = -5.
		

Crossrefs

Cf. A001045 (p=0,q=-1/2), A053088 (p=1,q=-1/2), A232604 (p=3,q=-1/2), A000225 (p=0,q=1/2), A000295 and A125128 (p=1,q=1/2), A047520 (p=2,q=1/2), A213575 (p=3,q=1/2), A232599 (p=3,q=-1), A232600 (p=1,q=-2), A232601 (p=2,q=-2), A232602 (p=3,q=-2).

Programs

  • Magma
    [((-1)^n*(2+12*n+9*n^2) -2^(n+1))/27: n in [0..30]]; // G. C. Greubel, Mar 31 2021
    
  • Maple
    A232603:= n-> ((-1)^n*(2+12*n+9*n^2) -2^(n+1))/27; seq(A232603(n), n=0..35); # G. C. Greubel, Mar 31 2021
  • Mathematica
    LinearRecurrence[{-1,3,5,2}, {0,-1,2,-5}, 35] (* G. C. Greubel, Mar 31 2021 *)
  • PARI
    a(n)=((-1)^n*(9*n^2+12*n+2)-2^(n+1))/27;
    
  • Sage
    [((-1)^n*(2+12*n+9*n^2) -2^(n+1))/27 for n in (0..30)] # G. C. Greubel, Mar 31 2021

Formula

a(n) = ((-1)^n*(9*n^2+12*n+2) - 2^(n+1))/27.
G.f.: x*(-1+x)/( (1-2*x)*(1+x)^3 ). - R. J. Mathar, Nov 23 2014
E.g.f.: (1/27)*(-2*exp(2*x) + (2 -21*x +9*x^2)*exp(-x)). - G. C. Greubel, Mar 31 2021
a(n) = - a(n-1) + 3*a(n-2) + 5*a(n-3) + 2*a(n-4). - Wesley Ivan Hurt, Mar 31 2021