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.

A061982 a(n) = 3^n - (n+1)*(n+2)/2.

Original entry on oeis.org

0, 0, 3, 17, 66, 222, 701, 2151, 6516, 19628, 58983, 177069, 531350, 1594218, 4782849, 14348771, 43046568, 129139992, 387420299, 1162261257, 3486784170, 10460352950, 31381059333, 94143178527, 282429536156, 847288609092, 2541865827951, 7625597484581, 22876792454526
Offset: 0

Views

Author

Henry Bottomley, May 24 2001

Keywords

Crossrefs

Column of A061980.

Programs

  • Magma
    [3^n -Binomial(n+2,2): n in [0..40]]; // G. C. Greubel, Jun 13 2022
    
  • Mathematica
    LinearRecurrence[{6,-12,10,-3}, {0,0,3,17}, 40] (* G. C. Greubel, Jun 13 2022 *)
  • PARI
    a(n) = { 3^n - (n + 1)*(n + 2)/2 } \\ Harry J. Smith, Jul 29 2009
    
  • SageMath
    [3^n -binomial(n+2,2) for n in (0..40)] # G. C. Greubel, Jun 13 2022

Formula

From G. C. Greubel, Jun 13 2022: (Start)
a(n) = 3^n - binomial(n+2, 2).
G.f.: x^2*(3-x)/((1-x)^3 * (1-3*x)).
E.g.f.: exp(3*x) - (1/2)*(2 + 4*x + x^2)*exp(x). (End)