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-3 of 3 results.

A287214 Number A(n,k) of set partitions of [n] such that for each block all absolute differences between consecutive elements are <= k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 4, 1, 1, 1, 2, 5, 8, 1, 1, 1, 2, 5, 13, 16, 1, 1, 1, 2, 5, 15, 34, 32, 1, 1, 1, 2, 5, 15, 47, 89, 64, 1, 1, 1, 2, 5, 15, 52, 150, 233, 128, 1, 1, 1, 2, 5, 15, 52, 188, 481, 610, 256, 1, 1, 1, 2, 5, 15, 52, 203, 696, 1545, 1597, 512, 1
Offset: 0

Views

Author

Alois P. Heinz, May 21 2017

Keywords

Comments

The sequence of column k satisfies a linear recurrence with constant coefficients of order 2^(k-1) for k>0.

Examples

			A(4,0) = 1: 1|2|3|4.
A(4,1) = 8: 1234, 123|4, 12|34, 12|3|4, 1|234, 1|23|4, 1|2|34, 1|2|3|4.
A(4,2) = 13: 1234, 123|4, 124|3, 12|34, 12|3|4, 134|2, 13|24, 13|2|4, 1|234, 1|23|4, 1|24|3, 1|2|34, 1|2|3|4.
Square array A(n,k) begins:
  1,  1,   1,   1,   1,   1,   1,   1, ...
  1,  1,   1,   1,   1,   1,   1,   1, ...
  1,  2,   2,   2,   2,   2,   2,   2, ...
  1,  4,   5,   5,   5,   5,   5,   5, ...
  1,  8,  13,  15,  15,  15,  15,  15, ...
  1, 16,  34,  47,  52,  52,  52,  52, ...
  1, 32,  89, 150, 188, 203, 203, 203, ...
  1, 64, 233, 481, 696, 825, 877, 877, ...
		

Crossrefs

Main diagonal gives A000110.

Programs

  • Maple
    b:= proc(n, k, l) option remember; `if`(n=0, 1, b(n-1, k, map(x->
          `if`(x-n>=k, [][], x), [l[], n]))+add(b(n-1, k, sort(map(x->
          `if`(x-n>=k, [][], x), subsop(j=n, l)))), j=1..nops(l)))
        end:
    A:= (n, k)-> b(n, min(k, n-1), []):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    b[0, , ] = 1; b[n_, k_, l_List] := b[n, k, l] = b[n - 1, k, If[# - n >= k, Nothing, #]& /@ Append[l, n]] + Sum[b[n - 1, k, Sort[If[# - n >= k, Nothing, #]& /@ ReplacePart[l, j -> n]]], {j, 1, Length[l]}];
    A[n_, k_] := b[n, Min[k, n - 1], {}];
    Table[A[n, d - n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Apr 30 2018, after Alois P. Heinz *)

Formula

A(n,k) = Sum_{j=0..k} A287213(n,j).

A294053 Number of set partitions of [n] such that the maximal absolute difference between consecutive elements within a block equals four.

Original entry on oeis.org

5, 38, 215, 1061, 4835, 20973, 88010, 360787, 1453978, 5784863, 22790024, 89092968, 346161413, 1338360327, 5153828402, 19781784669, 75723483993, 289218958150, 1102597884045, 4196961350447, 15954736073286, 60585891849501, 229855881578197, 871373727460242
Offset: 5

Views

Author

Alois P. Heinz, Oct 22 2017

Keywords

Crossrefs

Column k=4 of A287213.

Programs

  • Mathematica
    Drop[CoefficientList[Series[(x^5-2x^4+x^3-3x^2+7x-5)x^5/((x-1)(x^3-x^2- 3x+1)(x^8-x^7-7x^5+7x^4+x^3+4x^2-5x+1)),{x,0,30}],x],5] (* or *) LinearRecurrence[{9,-26,23,0,20,-40,2,16,-1,0,-3,1},{5,38,215,1061,4835,20973,88010,360787,1453978,5784863,22790024,89092968},30] (* Harvey P. Dale, May 25 2022 *)

Formula

G.f.: (x^5-2*x^4+x^3-3*x^2+7*x-5)*x^5 / ((x-1) *(x^3-x^2-3*x+1) *(x^8 -x^7 -7*x^5 +7*x^4 +x^3 +4*x^2 -5*x+1)).
a(n) = A287276(n) - A287275(n).

A294054 Number of set partitions of [n] such that the maximal absolute difference between consecutive elements within a block equals five.

Original entry on oeis.org

15, 129, 836, 4789, 25430, 128360, 625905, 2976800, 13896153, 63950894, 291050996, 1312981604, 5881158250, 26191105884, 116085151862, 512487018089, 2255036961813, 9895020092839, 43316960894877, 189247864529166, 825397574526671, 3594688070523059, 15635607417594050
Offset: 6

Views

Author

Alois P. Heinz, Oct 22 2017

Keywords

Crossrefs

Column k=5 of A287213.

Formula

G.f.: (x^15-3*x^13-2*x^12-4*x^11+7*x^10+21*x^9+9*x^8-33*x^7-44*x^6+48*x^5-10*x^4 +18*x^3+17*x^2-36*x+15)*x^6 / ((x^8-x^7-7*x^5+7*x^4+x^3+4*x^2-5*x+1) *(x^10-x^9 -x^7 -9*x^6 +10*x^5+9*x^4-7*x^3+4*x^2-5*x+1)*(x^6+x^5-x^4-3*x^2-x+1)).
a(n) = A287277(n) - A287276(n).
Showing 1-3 of 3 results.