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

A248687 Sum of the numbers in row n of the triangular array at A248686.

Original entry on oeis.org

1, 3, 10, 43, 221, 1371, 9696, 78751, 712447, 7173853, 79106413, 952587175, 12397677007, 173864946685, 2609479384942, 41786786069887, 710577455524223, 12795789975272877, 243154034699436147, 4864103085730989101, 102153340062463300261, 2247608818115460466681
Offset: 1

Views

Author

Clark Kimberling, Oct 11 2014

Keywords

Examples

			First seven rows of the array at A248686:
1
1   2
1   3    6
1   6    12    24
1   10   30    60    120
1   20   90    180   360    720
1   35   210   630   1260   2520   5040
The row sums are 1, 3, 10, ...
		

Crossrefs

Cf. A248686.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(k<1,
         `if`(n=k, 1, 0), n!/mul(iquo(n+i, k)!, i=0..k-1))
        end:
    a:= n-> add(b(n,k), k=0..n):
    seq(a(n), n=1..22);  # Alois P. Heinz, Feb 20 2024
  • Mathematica
    f[n_, k_] := f[n, k] = n!/Product[Floor[(n + i)/k]!, {i, 0, k - 1}]
    t = Table[f[n, k], {n, 0, 10}, {k, 1, n}];
    u = Flatten[t]  (* A248686 sequence *)
    TableForm[t]    (* A248686 array *)
    Table[Sum[f[n, k], {k, 1, n}], {n, 1, 22}] (* A248687 *)

Formula

a(n) = Sum_{k=1..n} n!/(n(1)!*n(2)!* ... *n(k)!), where n(i) = floor((n + i - 1)/k) for i = 1..k.
a(n) ~ 2 * n!. - Vaclav Kotesovec, Oct 21 2014
a(n) mod 2 = 0 <=> n in { A126646 } \ { 1 }. - Alois P. Heinz, Feb 20 2024

A333706 Number T(n,k) of permutations p of [n] such that |p(i+k) - p(i)| <> k for i in [n-k]; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 0, 2, 0, 0, 4, 6, 0, 2, 16, 20, 24, 0, 14, 44, 80, 108, 120, 0, 90, 200, 384, 544, 672, 720, 0, 646, 1288, 2240, 3264, 4128, 4800, 5040, 0, 5242, 9512, 15424, 23040, 28992, 34752, 38880, 40320, 0, 47622, 78652, 123456, 176832, 231936, 280512, 323520, 352800, 362880
Offset: 0

Views

Author

Alois P. Heinz, Apr 02 2020

Keywords

Comments

T(n,k) is defined for n,k >= 0. The triangle contains only the terms with k<=n. T(n,k) = n! for k>=n.

Examples

			Triangle T(n,k) begins:
  1;
  0,    1;
  0,    0,    2;
  0,    0,    4,     6;
  0,    2,   16,    20,    24;
  0,   14,   44,    80,   108,   120;
  0,   90,  200,   384,   544,   672,   720;
  0,  646, 1288,  2240,  3264,  4128,  4800,  5040;
  0, 5242, 9512, 15424, 23040, 28992, 34752, 38880, 40320;
  ...
		

Crossrefs

Columns k=0-10 (for n>=k) give: A000007, A002464, A110128, A117574, A189255, A189256, A189271, A360384, A360386, A360462, A360463.
Main diagonal gives A000142.
T(2n,n) gives A189849.
T(n+1,n) gives 4*A138772(n).
T(n+2,n) gives 16*A333804(n).
Cf. A000170 (condition is satisfied for all k), A248686 (p(i) at distance k are sorted).

A370505 T(n,k) is the difference between the number of k-dist-increasing and (k-1)-dist-increasing permutations of [n], where p is k-dist-increasing if k>=0 and p(i)=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 3, 0, 1, 5, 6, 12, 0, 1, 9, 20, 30, 60, 0, 1, 19, 70, 90, 180, 360, 0, 1, 34, 175, 420, 630, 1260, 2520, 0, 1, 69, 490, 1960, 2520, 5040, 10080, 20160, 0, 1, 125, 1554, 5880, 15120, 22680, 45360, 90720, 181440, 0, 1, 251, 3948, 21000, 88200, 113400, 226800, 453600, 907200, 1814400
Offset: 0

Views

Author

Alois P. Heinz, Feb 20 2024

Keywords

Examples

			T(0,0) = 1: (only) the empty permutation is 0-dist-increasing.
T(4,2) = 5 = 6 - 1 = |{1234, 1243, 1324, 2134, 2143, 3142}| - |{1234}|.
Permutation 3142 is 2-dist-increasing and 4-dist-increasing but not 3-dist-increasing.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1,   1;
  0, 1,   2,    3;
  0, 1,   5,    6,   12;
  0, 1,   9,   20,   30,    60;
  0, 1,  19,   70,   90,   180,   360;
  0, 1,  34,  175,  420,   630,  1260,  2520;
  0, 1,  69,  490, 1960,  2520,  5040, 10080, 20160;
  0, 1, 125, 1554, 5880, 15120, 22680, 45360, 90720, 181440;
  ...
		

Crossrefs

Columns k=0-2 give: A000007, A057427, A014495.
Row sums give A000142.
Main diagonal gives A001710.
T(2n,n+1) gives A000680 for n>=1.
T(2n,n) gives A370576.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(k<1,
         `if`(n=k, 1, 0), n!/mul(iquo(n+i, k)!, i=0..k-1))
        end:
    T:= (n, k)-> b(n, k)-b(n, k-1):
    seq(seq(T(n, k), k=0..n), n=0..10);

Formula

T(n,k) = A248686(n,k) - A248686(n,k-1) for k>=2.
Sum_{k=0..n} (1+n-k) * T(n,k) = A248687(n) for n>=1.

A361651 Number T(n,k) of permutations p of [n] such that p(i), p(i+k), p(i+2k),... form an up-down sequence for i in [k]; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 2, 3, 6, 0, 5, 6, 12, 24, 0, 16, 20, 30, 60, 120, 0, 61, 80, 90, 180, 360, 720, 0, 272, 350, 420, 630, 1260, 2520, 5040, 0, 1385, 1750, 2240, 2520, 5040, 10080, 20160, 40320, 0, 7936, 10080, 13440, 15120, 22680, 45360, 90720, 181440, 362880
Offset: 0

Views

Author

Alois P. Heinz, Mar 19 2023

Keywords

Comments

Number T(n,k) of permutations p of [n] such that p(i) < p(i+k) > p(i+2k) < ... for i <= k.
T(n,k) is defined for n,k >= 0. The triangle contains only the terms with k<=n. T(n,k) = n! for k>=n.

Examples

			Triangle T(n,k) begins:
  1;
  0,    1;
  0,    1,    2;
  0,    2,    3,    6;
  0,    5,    6,   12,   24;
  0,   16,   20,   30,   60,  120;
  0,   61,   80,   90,  180,  360,   720;
  0,  272,  350,  420,  630, 1260,  2520,  5040;
  0, 1385, 1750, 2240, 2520, 5040, 10080, 20160, 40320;
  ...
		

Crossrefs

Columns k=0-3 give: A000007, A000111, A361648, A367336.
Main diagonal gives A000142.
T(2n,n) gives A000680.

Programs

  • Maple
    b:= proc(u, o) option remember; `if`(u+o=0, 1,
          add(b(o-1+j, u-j), j=1..u))
        end:
    T:= (n, k)-> `if`(n=0, 1, `if`(k=0, 0, (l-> mul(b(s, 0), s=l)*
        combinat[multinomial](n, l[]))([floor((n+i)/k)$i=0..k-1]))):
    seq(seq(T(n, k), k=0..n), n=0..10);
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!);
    b[u_, o_] := b[u, o] = If[u+o == 0, 1, Sum[b[o-1+j, u-j], {j, 1, u}]];
    T[n_, k_] := If[n == 0, 1, If[k == 0, 0, Function[l, Product[b[s, 0], {s, l}]*multinomial[n, l]][Table[Floor[(n+i)/k], {i, 0, k-1}]]]];
    Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, Nov 22 2023, after Alois P. Heinz *)
Showing 1-4 of 4 results.