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.

A331320 a(n) = [x^n] ((x + 1)*(2*x - 1)*(2*x^2 - 1))/(2*x^2 + 2*x - 1)^2.

Original entry on oeis.org

1, 3, 8, 26, 80, 244, 736, 2200, 6528, 19248, 56448, 164768, 478976, 1387328, 4005376, 11530624, 33107968, 94839552, 271091712, 773380608, 2202374144, 6261404672, 17774206976, 50384312320, 142636515328, 403306786816, 1139055820800, 3213593911296, 9057375289344
Offset: 0

Views

Author

Peter Luschny, Jan 14 2020

Keywords

Crossrefs

Cf. A322942 (Jacobsthal triangle), A331319, A331321.

Programs

  • Maple
    a := proc(n) option remember; if n < 3 then return [1, 3, 8][n+1] fi;
    (12*(n - 3)*a(n-3) + (14*n - 6)*a(n-2) + (70 - 4*n)*a(n-1))/(n+19) end:
    seq(a(n), n=0..28);
    # Alternative:
    gf := ((x + 1)*(2*x - 1)*(2*x^2 - 1))/(2*x^2 + 2*x - 1)^2:
    ser := series(gf, x, 32): seq(coeff(ser, x, n), n=0..28);
  • Mathematica
    LinearRecurrence[{4,0,-8,-4},{1,3,8,26,80},40] (* Harvey P. Dale, Jun 14 2025 *)
  • PARI
    Vec((1 + x)*(1 - 2*x)*(1 - 2*x^2) / (1 - 2*x - 2*x^2)^2 + O(x^30)) \\ Colin Barker, Jan 14 2020

Formula

a(n) = Sum_{k=0..n} A322942(n,k)*(k+1).
a(n) = (12*(n - 3)*a(n-3) + (14*n - 6)*a(n-2) + (70 - 4*n)*a(n-1))/(n + 19).
Let h(k) = (1+k)*exp((1+k)*x)*(3*x+12-4*k)/18 then
a(n) = n!*[x^n](h(sqrt(3)) + h(-sqrt(3)) + 1).
From Colin Barker, Jan 14 2020: (Start)
a(n) = 4*a(n-1) - 8*a(n-3) - 4*a(n-4) for n>4.
a(n) = (-8*sqrt(3)*((1-sqrt(3))^n - (1+sqrt(3))^n) + 3*((1-sqrt(3))^n + (1+sqrt(3))^n)*n) / 18 for n>0.
(End)