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.

A151640 Number of permutations of 4 indistinguishable copies of 1..n with exactly 2 adjacent element pairs in decreasing order.

Original entry on oeis.org

0, 36, 1828, 40136, 693960, 11000300, 168594156, 2550000528, 38371094416, 576250000820, 8647558594740, 129734375001176, 1946130371095128, 29192578125001596, 437892028808595580, 6568398437500002080, 98526072692871096096, 1477891601562500002628
Offset: 1

Views

Author

R. H. Hardin, May 29 2009

Keywords

Crossrefs

Column k=2 of A236463.

Programs

  • Magma
    [15^n -(4*n+1)*5^n +2*n*(4*n+1): n in [1..30]]; // G. C. Greubel, Sep 08 2022
    
  • Mathematica
    Table[Sum[(-1)^j*Binomial[4*n+1,j]*Binomial[6-j,4]^n, {j,0,2}], {n,30}] (* G. C. Greubel, Sep 08 2022 *)
  • PARI
    a(n) = {15^n - (4*n + 1)*5^n + 2*n*(4*n + 1)} \\ Andrew Howroyd, May 06 2020
    
  • PARI
    concat(0, Vec(4*x^2*(9 + 205*x - 485*x^2 - 625*x^3) / ((1 - x)^3*(1 - 5*x)^2*(1 - 15*x)) + O(x^20))) \\ Colin Barker, May 07 2020
    
  • SageMath
    [15^n -(4*n+1)*5^n +2*n*(4*n+1) for n in (1..30)] # G. C. Greubel, Sep 08 2022

Formula

a(n) = 15^n - (4*n + 1)*5^n + 2*n*(4*n + 1). - Andrew Howroyd, May 06 2020
From Colin Barker, May 06 2020: (Start)
G.f.: 4*x^2*(9 + 205*x - 485*x^2 - 625*x^3) / ((1 - x)^3*(1 - 5*x)^2*(1 - 15*x)).
a(n) = 28*a(n-1) - 253*a(n-2) + 976*a(n-3) - 1675*a(n-4) + 1300*a(n-5) - 375*a(n-6) for n > 6. (End)
E.g.f.: exp(15*x) - (1+20*x)*exp(5*x) + 2*x*(5+4*x)*exp(x). - G. C. Greubel, Sep 08 2022

Extensions

Terms a(9) and beyond from Andrew Howroyd, May 06 2020