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.

A232602 a(n) = Sum_{k=0..n} k^p*q^k, where p=3, q=-2.

Original entry on oeis.org

0, -2, 30, -186, 838, -3162, 10662, -33242, 97830, -275418, 748582, -1977306, 5100582, -12897242, 32060454, -78531546, 189903910, -454052826, 1074770982, -2521320410, 5867287590, -13554437082
Offset: 0

Views

Author

Stanislav Sykora, Nov 27 2013

Keywords

Examples

			a(3) = 0^3*2^0 - 1^3*2^1 + 2^3*2^2 - 3^3*2^3 = -186.
		

Crossrefs

Cf. A059841 (p=0,q=-1), A130472 (p=1,q=-1), A089594 (p=2,q=-1), A232599 (p=3,q=-1), A126646 (p=0,q=2), A036799 (p=1,q=2), A036800 (p=2,q=2), A036827 (p=3,q=2), A077925 (p=0,q=-2), A232600 (p=1,q=-2), A232601 (p=2,q=-2), A232603 (p=2,q=-1/2), A232604 (p=3,q=-1/2).

Programs

  • Magma
    [2*(1 -(-2)^n*(1 +3*n -9*n^2 -9*n^3))/27: n in [0..35]]; // G. C. Greubel, Mar 31 2021
    
  • Maple
    A232602:= n-> 2*(1 -(-2)^n*(1 +3*n -9*n^2 -9*n^3))/27; seq(A232602(n), n=0..35); # G. C. Greubel, Mar 31 2021
  • Mathematica
    LinearRecurrence[{-7,-16,-8,16,16}, {0,-2,30,-186,838}, 40] (* G. C. Greubel, Mar 31 2021 *)
  • PARI
    a(n)=((-1)^n*2^(n+1)*(27*n^3+27*n^2-9*n-3)+6)/81;
    
  • Sage
    [2*(1 -(-2)^n*(1 +3*n -9*n^2 -9*n^3))/27 for n in (0..35)] # G. C. Greubel, Mar 31 2021

Formula

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