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.

A353094 a(1) = 2; for n > 1, a(n) = 3*a(n-1) + 3 - n.

Original entry on oeis.org

2, 7, 21, 62, 184, 549, 1643, 4924, 14766, 44291, 132865, 398586, 1195748, 3587233, 10761687, 32285048, 96855130, 290565375, 871696109, 2615088310, 7845264912, 23535794717, 70607384131, 211822152372, 635466457094, 1906399371259, 5719198113753, 17157594341234
Offset: 1

Views

Author

Seiichi Manyama, Apr 23 2022

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{5, -7, 3}, {2, 7, 21}, 28] (* Amiram Eldar, Apr 23 2022 *)
  • PARI
    my(N=30, x='x+O('x^N)); Vec(x*(2-3*x)/((1-x)^2*(1-3*x)))
    
  • PARI
    a(n) = (3^(n+1)+2*n-3)/4;
    
  • PARI
    b(n, k) = sum(j=0, n-1, (k-n+j)*k^j);
    a(n) = b(n, 3);

Formula

G.f.: x * (2 - 3*x)/((1 - x)^2 * (1 - 3*x)).
a(n) = 5*a(n-1) - 7*a(n-2) + 3*a(n-3).
a(n) = A000340(n-1) + n.
a(n) = (3^(n+1) + 2*n - 3)/4.
a(n) = Sum_{k=0..n-1} (3 - n + k) * 3^k.
E.g.f.: exp(x)*(3*exp(2*x) + 2*x - 3)/4. - Stefano Spezia, May 28 2023