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.

A368528 a(n) = Sum_{k=1..n} k^2 * 3^(n-k).

Original entry on oeis.org

0, 1, 7, 30, 106, 343, 1065, 3244, 9796, 29469, 88507, 265642, 797070, 2391379, 7174333, 21523224, 64569928, 193710073, 581130543, 1743391990, 5230176370, 15690529551, 47071589137, 141214767940, 423644304396, 1270932913813, 3812798742115
Offset: 0

Views

Author

Seiichi Manyama, Dec 28 2023

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=1, n, k^2*3^(n-k));

Formula

G.f.: x * (1+x)/((1-3*x) * (1-x)^3).
a(n) = 6*a(n-1) - 12*a(n-2) + 10*a(n-3) - 3*a(n-4).
a(n) = A052150(n-1) + A052150(n-2) for n > 1.
a(n) = (3^(n+1) - (n^2 + 3*n + 3))/2.
a(0) = 0; a(n) = 3*a(n-1) + n^2.