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.

A370528 Number of permutations of [n] having exactly two adjacent 3-cycles.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 3, 12, 57, 348, 2460, 19806, 178950, 1794420, 19778210, 237696420, 3093642300, 43350548655, 650733622665, 10417925247240, 177191430300339, 3190747212651432, 60645032890871688, 1213255040678034508, 25484737348664027532, 560785511736390349080
Offset: 0

Views

Author

Seiichi Manyama, Feb 21 2024

Keywords

Crossrefs

Column k=2 of A177250.

Programs

  • Magma
    [n le 5 select 0 else (&+[(-1)^k*Factorial(n-2*k-4)/Factorial(k): k in [0..Floor((n-6)/3)]])/2: n in [0..30]]; // G. C. Greubel, May 01 2024
    
  • Mathematica
    Table[Sum[(-1)^k*(n-2*k-4)!/k!, {k,0,Floor[(n-6)/3]}]/2, {n,0,30}] (* G. C. Greubel, May 01 2024 *)
  • PARI
    my(N=30, x='x+O('x^N)); concat([0, 0, 0, 0, 0, 0], Vec(sum(k=2, N, k!*x^(k+4)/(1+x^3)^(k+1))/2))
    
  • PARI
    a(n, k=2, q=3) = sum(j=0, n\q-k, (-1)^j*(n-(q-1)*(j+k))!/j!)/k!;
    
  • SageMath
    [sum((-1)^k*factorial(n-2*k-4)/factorial(k) for k in range(1+(n-6)//3))/2 for n in range(31)] # G. C. Greubel, May 01 2024

Formula

G.f.: (1/2) * Sum_{k>=2} k! * x^(k+4) / (1+x^3)^(k+1).
a(n) = (1/2) * Sum_{k=0..floor(n/3)-2} (-1)^k * (n-2*k-4)! / k!.