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.

A228117 Number of partitions of n that have hookset {1,2,...,k} for some k.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 4, 6, 7, 9, 10, 16, 14, 23, 24, 33, 33, 50, 50, 71, 75, 101, 103, 146, 151, 201, 211, 280, 292, 389, 409, 519, 573, 707, 765, 960, 1043, 1276, 1393, 1704, 1870, 2258, 2483, 2970, 3281, 3920, 4290, 5101, 5659, 6640, 7318, 8628, 9506, 11081
Offset: 0

Views

Author

William J. Keith, Aug 10 2013

Keywords

Comments

It appears to be the case that the difference between entry a(2n-1) and a(2n) is substantially less than the difference between a(2n) and a(2n+1), after a few initial exceptions.

Examples

			a(7) = 6, counting the partitions (7), (43), (331), (322), (2221), and (111111).  The hooklengths of (7) are {1,2,3,4,5,6,7}, and the hooklengths of (322) are {1,1,2,2,3,4,5}.
		

Crossrefs

Cf. A158291, the number of partitions which have hookset {1,2,...,n}, not counting multiplicities.

Programs

  • Maple
    h:= proc(l) local n, s; n:=nops(l); s:= {seq(seq(1+l[i]-j
           +add(`if`(l[k]>=j, 1, 0), k=i+1..n), j=1..l[i]), i=1..n)};
           `if`(s={$1..max(s[], 0)}, 1, 0)
        end:
    g:= (n, i, l)-> `if`(n=0 or i=1, h([l[], 1$n]), `if`(i<1, 0,
                 g(n, i-1, l)+`if`(i>n, 0, g(n-i, i, [l[], i])))):
    a:= n-> g(n$2, []):
    seq(a(n), n=0..30);  # Alois P. Heinz, Aug 12 2013
  • Mathematica
    << "Combinatorica`"
    HookSet[Lambda_] := Module[{i, j, k, HookHolder},
      HookHolder = {};
      HS = {};
      For[i = 1, i < Length[Lambda] + 1, i++,
       For[j = 1, j < Lambda[[i]] + 1, j++,
        CurrentHook =
         Lambda[[i]] - j + TransposePartition[Lambda][[j]] - i + 1;
        If[! MemberQ[HS, CurrentHook],
         HookHolder = Append[HS, CurrentHook]; HS = HookHolder]
        ]
       ];
      HookHolder = Sort[HS];
      HS = HookHolder;
      Return[HS]]
    For[i = 1, i < 31, i++,
    For[j = 1, j < PartitionsP[i] + 1, j++,
      CurrSet=HookSet[Partitions[i][[j]]];
      If[CurrSet == Table[i,{i,1,Length[CurrSet]}],
       SGFHolder = SegGenFn + q^i;
       SegGenFn = SGFHolder]
      ]
    ]
    (* second program: *)
    h[l_] := Module[{n, s}, n = Length[l]; s = Table[Table[1 + l[[i]] - j + Sum[If[l[[k]] >= j, 1, 0], {k, i+1, n}], {j, 1, l[[i]]}], {i, 1, n}] // Flatten // Union; If[s == Range[Max[Append[s, 0]]], 1, 0]]; g[n_, i_, l_] := g[n, i, l] = If[n == 0 || i == 1, h[Join[l, Array[1&, n]]], If[i<1, 0, g[n, i-1, l] + If[i>n, 0, g[n-i, i, Append[l, i]]]]]; a[n_] := g[n, n, {}]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 60}] (* Jean-François Alcover, Jan 22 2016, after Alois P. Heinz *)

Extensions

a(31)-a(53) from Alois P. Heinz, Aug 12 2013