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.

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

Original entry on oeis.org

1, 0, -2, -3, 6, 25, 1, -147, -218, 591, 2223, -484, -14871, -18759, 68353, 222697, -116058, -1629671, -1656989, 8275203, 23266031, -20154144, -184550412, -141418628, 1019061001, 2468408775, -3122976521, -21213927840, -10837119735, 126256071125, 262294667301, -456407675223
Offset: 0

Views

Author

Peter Bala, Jul 25 2025

Keywords

Comments

The Gauss congruences a(n*p^k) == a(n*p^(k-1)) (mod p^k) hold for all primes p and all positive integers n and k.
Conjecture: the stronger supercongruences a(n*p^k) == a(n*p^(k-1)) (mod p^(2*k)) hold for all primes p >= 5 and all positive integers n and k.

Crossrefs

Programs

  • Maple
    a := proc(n) option remember; if n = 0 then 1 elif n = 1 then 0 elif n = 2 then -2 else
    ( 2*(n-1)*(2*n-3)*(19*n^2-60*n+36)*a(n-1) - 2*(190*n^4-1170*n^3+2519*n^2-2229*n+666)*a(n-2) - 2*(n-3)*(2*n-3)*(19*n^2-41*n+18)*a(n-3) )/(3*n*(n-1)*(19*n^2-79*n+78)) fi; end:
    seq(a(n), n = 0..30);
  • Mathematica
    a[n_]:=SeriesCoefficient[((1 - x)/(1 - x + x^2))^n,{x,0,n}]; Array[a,32,0] (* Stefano Spezia, Jul 29 2025 *)
  • PARI
    a(n) = my(x='x+O('x^(n+1))); polcoef(((1 - x)/(1 - x + x^2))^n, n); \\ Michel Marcus, Aug 03 2025

Formula

a(n) = Sum_{k = 0..floor(n/2)} binomial(-n, k)*binomial(n-k-1, n-2*k) = Sum_{k = 0
..floor(n/2)} (-1)^k*binomial(n+k-1, k)*binomial(n-k-1, n-2*k). Cf. A246437.
a(n) = -n*hypergeom([n+1, 1 - (1/2)*n, 3/2 - (1/2)*n], [2, 2 - n], 4) for n >= 3.
P-recursive: 3*n*(n - 1)*(19*n^2 - 79*n + 78)*a(n) = 2*(n - 1)*(2*n - 3)*(19*n^2 - 60*n + 36)*a(n-1) - 2*(190*n^4 - 1170*n^3 + 2519*n^2 - 2229*n + 666)*a(n-2) - 2*(n - 3)*(2*n - 3)*(19*n^2 - 41*n + 18)*a(n-3) with a(0) = 1, a(1) = 0 and a(2) = -2.
exp( Sum_{n >= 1} a(n)*(-x)^n/n ) = 1 - x^2 + x^3 + 2*x^4 - 6*x^5 - x^6 + ... is the g.f. of A364374.