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.

A370530 Number of permutations of [n] having exactly three adjacent 3-cycles.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 4, 20, 116, 820, 6600, 59650, 598140, 6592740, 79232140, 1031214100, 14450182880, 216911207555, 3472641749080, 59063810100120, 1063582404217144, 20215010963623896, 404418346892678160, 8494912449554675844, 186928503912130116360
Offset: 0

Views

Author

Seiichi Manyama, Feb 21 2024

Keywords

Crossrefs

Column k=3 of A177250.

Programs

  • Magma
    [n le 8 select 0 else (&+[(-1)^k*Factorial(n-2*k-6)/Factorial(k): k in [0..Floor((n-9)/3)]])/6: n in [0..30]]; // G. C. Greubel, May 01 2024
    
  • Mathematica
    Table[Sum[(-1)^k*(n-2*k-6)!/k!, {k,0,Floor[(n-9)/3]}]/6, {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, 0, 0, 0], Vec(sum(k=3, N, k!*x^(k+6)/(1+x^3)^(k+1))/6))
    
  • PARI
    a(n, k=3, 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-6)/factorial(k) for k in range(1+(n-9)//3))/6 for n in range(31)] # G. C. Greubel, May 01 2024

Formula

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