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.

A213242 Number of generalizations of the partition 1^n.

Original entry on oeis.org

1, 2, 3, 6, 12, 31, 89, 303, 1119, 4649, 20572, 99241, 502622, 2725840, 15424019, 92211327, 571446565, 3716191974, 24920512847, 174169990243, 1251875604302, 9326245177768, 71241318920624, 562221733320241, 4535497053407716, 37677863148632647, 319551379756283637
Offset: 1

Views

Author

Alois P. Heinz, Jun 14 2012

Keywords

Comments

Consider the ranked poset L(n) of partitions defined in A002846. Then a(n) is the total number of paths of all lengths 0,1,...,n-1 that start at any node in the poset and end at 1^n.

Examples

			For n=5 there are a(5) = 12 paths to 1^5 = 11111: 11111; 2111->11111; 221->2111->11111; 311->2111->11111; 32->221->2111->11111; 32->311->2111->11111; 41->221->2111->11111; 41->311->2111->11111; 5->32->221->2111->11111; 5->32->311->2111->11111; 5->41->221->2111->11111; 5->41->311->2111->11111.
		

Crossrefs

Programs

  • Maple
    b:= proc(l) option remember; local n, i, j, t; n:=nops(l);
          `if`(n<2, 1, `if`(l[n]=0, b(subsop(n=NULL, l)),
          add(`if`(l[i]=0, 0, add(b([seq(l[t]-`if`(t=1, l[t],
          `if`(t=i, 1, `if`(t=j and t=i-j, -2, `if`(t=j or t=i-j,
          -1, 0)))), t=1..n)]), j=1..i/2)), i=2..n)))
        end:
    g:= proc(n, i, l)
          `if`(n=0 and i=0, b(l), `if`(i=1, b([n, l[]]), add(g(n-i*j, i-1,
          `if`(l=[] and j=0, l, [j, l[]])), j=0..n/i)))
        end:
    a:= n-> g(n, n, []):
    seq(a(n), n=1..25);
  • Mathematica
    b[l_] := b[l] = With[{n = Length[l]}, If[n < 2, 1, If[l[[n]] == 0, b[ReplacePart[l, n -> Sequence[] ]], Sum[If[l[[i]] == 0, 0, Sum[b[Join[Table[l[[t]]-If[t == 1, l[[t]], If[t == i, 1, If[t == j && t == i-j, -2, If[t == j || t == i-j, -1, 0]]]], {t, 1, n}]]], {j, 1, i/2}]], {i, 2, n}]]] ]; g[n_, i_, l_] := If[n == 0 && i == 0, b[l], If[i == 1, b[Prepend[l, n]], Sum[g[n-i*j, i-1, If[l == {} && j == 0, l, Prepend[ l, j]]], {j, 0, n/i}]]] ; a[n_] := g[n, n, {}]; Table[a[n], {n, 1, 27}] // Flatten (* Jean-François Alcover, Dec 18 2013, translated from Maple *)

Extensions

Edited by Alois P. Heinz at the suggestion of Gus Wiseman, May 02 2016