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.

Showing 1-2 of 2 results.

A322013 Square array A(n,k), n >= 1, k >= 1, read by antidiagonals, where A(n,k) is the number of permutations of n copies of 1..k introduced in order 1..k with no element equal to another within a distance of 1.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 5, 1, 0, 1, 36, 29, 1, 0, 1, 329, 1721, 182, 1, 0, 1, 3655, 163386, 94376, 1198, 1, 0, 1, 47844, 22831355, 98371884, 5609649, 8142, 1, 0, 1, 721315, 4420321081, 182502973885, 66218360625, 351574834, 56620, 1, 0
Offset: 1

Views

Author

Seiichi Manyama, Nov 24 2018

Keywords

Examples

			Square array begins:
   1, 1,     1,         1,              1,                    1, ...
   0, 1,     5,        36,            329,                 3655, ...
   0, 1,    29,      1721,         163386,             22831355, ...
   0, 1,   182,     94376,       98371884,         182502973885, ...
   0, 1,  1198,   5609649,    66218360625,     1681287695542855, ...
   0, 1,  8142, 351574834, 47940557125969, 16985819072511102549, ...
		

Crossrefs

Main diagonal gives A321666.

Programs

  • PARI
    q(n,x) = sum(i=1, n, (-1)^(n-i) * binomial(n-1, n-i) * x^i/i!)
    T(n,k) = subst(serlaplace(q(n,x)^k), x, 1)/k! \\ Andrew Howroyd, Feb 03 2024

Formula

T(n,k) = A322093(n,k) / k!. - Andrew Howroyd, Feb 03 2024

A190917 Number of permutations of n copies of 1..3 introduced in order 1..3 with no element equal to another within a distance of 1.

Original entry on oeis.org

1, 1, 5, 29, 182, 1198, 8142, 56620, 400598, 2872754, 20824778, 152303410, 1122149800, 8319825040, 62017475600, 464452683432, 3492568119566, 26358270711370, 199565061455634, 1515311001158482, 11535716330003876, 88025068713285476, 673124069796140900
Offset: 0

Views

Author

R. H. Hardin, May 23 2011

Keywords

Examples

			All solutions for n=2:
  1    1    1    1    1
  2    2    2    2    2
  3    3    3    3    1
  1    2    2    1    3
  3    3    1    2    2
  2    1    3    3    3
		

Crossrefs

Column 3 of A322013.
Cf. A000012 (b=2), A190918 (b=4), A190920 (b=5), A190923 (b=6), A190927 (b=7), A190932 (b=8), A321987 (b=9), A322061 (b=10).

Programs

  • Magma
    [(&+[Binomial(n-1, k)*(Binomial(n-1, k)*Binomial(2*n+1-2*k, n+1) + Binomial(n-1, k+1)*Binomial(2*n-2*k, n+1)): k in [0..Floor(n/2)]])/3: n in [1..25]]; // G. C. Greubel, Nov 24 2018
    
  • Maple
    a:= proc(n) option remember; `if`(n<3, [1$2, 5][n+1],
          ((7*n-4)*a(n-1)+8*(n-2)^2*a(n-2)/(n+1))/n)
        end:
    seq(a(n), n=0..22);  # Alois P. Heinz, Sep 09 2023
  • Mathematica
    Table[(1/3)*Sum[Binomial[n-1, k]*(Binomial[n-1, k]*Binomial[2*n+1-2*k, n+1] + Binomial[n-1, k+1]*Binomial[2*n-2*k, n+1]), {k,0,Floor[n/2]}], {n,1,25}] (* G. C. Greubel, Nov 24 2018 *)
  • PARI
    A190917(n) = sum(k=0, n\2, binomial(n-1, k)*(binomial(n-1, k)*binomial(2*n+1-2*k, n+1)+binomial(n-1, k+1)*binomial(2*n-2*k, n+1))) / 3; \\ Max Alekseyev, Dec 10 2017
    
  • Sage
    [(1/3)*sum(binomial(n-1, k)*(binomial(n-1, k)*binomial(2*n+1-2*k, n+1) + binomial(n-1, k+1)*binomial(2*n-2*k, n+1))  for k in range(1+floor(n/2))) for n in (1..25)] # G. C. Greubel, Nov 24 2018

Formula

a(n) = A110706(n) / 6 for n >= 1.
n*(n+1)*a(n) - (n+1)*(7*n-4)*a(n-1) - 8*(n-2)^2*a(n-2) = 0. - R. J. Mathar, Nov 01 2015 from A110706

Extensions

a(0)=1 prepended by Alois P. Heinz, Sep 09 2023
Showing 1-2 of 2 results.