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.

A047909 Array read by antidiagonals upwards: h(n,k) = number of sequences with n copies each of 1,2,...,k and longest increasing subsequence of length k (n>=1, k>=1).

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 19, 47, 1, 1, 69, 1306, 641, 1, 1, 251, 31451, 195709, 11389, 1, 1, 923, 729811, 46922017, 50775091, 248749, 1, 1, 3431, 16928840, 10258694241, 162588279629, 20117051281, 6439075, 1, 1, 12869, 397222288, 2176464012941, 449363984934526, 1077273394836829, 11260558754404, 192621953, 1
Offset: 1

Views

Author

Keywords

Comments

Old name was: Triangle of numbers arising from problem of complete increasing subsequences.
Table h_p(k) on page 80 in the Horton & Kurn reference has two typos. - Alois P. Heinz, Feb 05 2016
Conjecture: Column k > 1 is asymptotic to k^(k*n + 1/2) / (2*Pi*n)^((k-1)/2). - Vaclav Kotesovec, Feb 21 2016
Conjecture: Row k > 1 is asymptotic to sqrt(k) * (k^k/(k-1)!)^n * n^((k-1)*n) / exp((k-1)*(n+1)). - Vaclav Kotesovec, Feb 21 2016

Examples

			First few antidiagonals are:
  1;
  1,   1;
  1,   5,      1;
  1,  19,     47,        1;
  1,  69,   1306,      641,        1;
  1, 251,  31451,   195709,    11389,      1;
  1, 923, 729811, 46922017, 50775091, 248749,   1;
  ...
First few rows are:
  1,   1,        1,             1,                   1, ...
  1,   5,       47,           641,               11389, ...
  1,  19,     1306,        195709,            50775091, ...
  1,  69,    31451,      46922017,        162588279629, ...
  1, 251,   729811,   10258694241,     449363984934526, ...
  1, 923, 16928840, 2176464012941, 1162145520205261219, ...
  ...
		

Crossrefs

Main diagonal gives A268485.

Programs

  • Maple
    g:= proc(l) option remember; (n-> f(l[1..nops(l)-1])*
          binomial(n-1, l[-1]-1)+ add(f(sort(subsop(j=l[j]
          -1, l))), j=1..nops(l)-1))(add(i, i=l))
        end:
    f:= l-> (n-> `if`(n<2 or l[-1]=1, 1, `if`(l[1]=0, 0, `if`(
             n=2, binomial(l[1]+l[2], l[1])-1, g(l)))))(nops(l)):
    h:= (n, k)-> f([n$k]):
    seq(seq(h(1+d-k, k), k=1..d), d=1..10);  # Alois P. Heinz, Feb 11 2016
    # second Maple program:
    b:= proc(k, p, j, l, t) option remember;
          `if`(k=0, (-1)^t/l!, `if`(p<0, 0, add(b(k-i, p-1,
           j+1, l+i*j, irem(t+i*j, 2))/(i!*p!^i), i=0..k)))
        end:
    h:= (p, k)-> k!*(p*k)!*b(k, p-1, 1, 0, irem(k, 2)):
    seq(seq(h(1+d-k, k), k=1..d), d=1..10);  # Alois P. Heinz, Mar 03 2016
  • Mathematica
    g[l_] := g[l] = Function[n, f[l[[1 ;; -2]]]*Binomial[n-1, l[[-1]]-1] + Sum[ f[Sort[ReplacePart[l, j -> l[[j]] - 1]]], {j, 1, Length[l] -1}]][ Total[ l]]; f[l_] := Function [n, If[n<2 || l[[-1]]==1, 1, If[l[[1]]==0, 0, If[n == 2, Binomial[l[[1]] + l[[2]], l[[1]] ] - 1, g[l]]]]][Length[l]]; h[n_, k_] := f[Array[n&, k]]; Table[Table[h[1+d-k, k], {k, 1, d}], {d, 1, 10}] // Flatten (* Jean-François Alcover, Feb 19 2016, after Alois P. Heinz *)

Formula

Reference gives explicit formula.

Extensions

New name, two terms corrected and more terms from Alois P. Heinz, Feb 08 2016

A268751 Number of sequences with n copies each of 1,2,...,n avoiding the pattern 12...n.

Original entry on oeis.org

0, 0, 1, 374, 16140983, 173996758190594, 791857392420720220446647, 2285085934263252199073238394141449534, 5841526335200139692050292842849347521755651331941759, 17585875137049122003330684747231440185032966840579881629527695901745706
Offset: 0

Views

Author

Alois P. Heinz, Feb 12 2016

Keywords

Examples

			a(2) = 1: 2211.
a(3) = 374: 111333222, 113133222, 113313222, ..., 333221121, 333221211, 333222111.
		

Crossrefs

Main diagonal of A269129.

Formula

a(n) = A034841(n) - A268485(n).

A268667 Number of sequences with j copies of j for each j in {1,2,...,n} and longest increasing subsequence of length n.

Original entry on oeis.org

1, 1, 2, 26, 3511, 6742796, 233249911607, 175703195017370516, 3377940832101159287907151, 1899957346851645870857879683505890, 35246706696124014829643459097288501560957174, 23998872279553738609365779286317516184675391844037227392
Offset: 0

Views

Author

Alois P. Heinz, Feb 10 2016

Keywords

Comments

Sequences counted by a(n) have length A000217(n) and element sum A000330(n).

Examples

			a(2) = 2: 122, 212.
a(3) = 26: 122333, 123233, 123323, 123332, 132233, 132323, 132332, 133223, 133232, 212333, 213233, 213323, 231233, 231323, 233123, 312233, 312323, 312332, 313223, 313232, 321233, 321323, 323123, 331223, 331232, 332123.
		

Crossrefs

Programs

  • Maple
    g:= proc(l) option remember; (n-> f(l[1..nops(l)-1])*
          binomial(n-1, l[-1]-1)+ add(f(sort(subsop(j=l[j]
          -1, l))), j=1..nops(l)-1))(add(i, i=l))
        end:
    f:= l-> (n-> `if`(n<2 or l[-1]=1, 1, `if`(l[1]=0, 0, `if`(
             n=2, binomial(l[1]+l[2], l[1])-1, g(l)))))(nops(l)):
    a:= n-> f([$1..n]):
    seq(a(n), n=0..8);
  • Mathematica
    g[l_] := g[l] = Function[n, f[Most[l]]*Binomial[n-1, l[[-1]]-1] + Sum[f[ Sort[ ReplacePart[l, j -> l[[j]]-1]]], {j, 1, Length[l]-1}]][Total[l]];
    f[l_] := Function[n, If[n<2 || l[[-1]]==1, 1, If[l[[1]]==0, 0, If[n==2, Binomial[l[[1]] + l[[2]], l[[1]]]-1, g[l]]]]][Length[l]];
    a[n_] := f[Range[n]];
    Table[a[n], {n, 0, 11}] (* Jean-François Alcover, Feb 27 2017, after Alois P. Heinz *)
Showing 1-3 of 3 results.