OFFSET
1,2
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..381
William J. Keith, Recursively Self-Conjugate Partitions, Integers 11A, (2011) Article 12.
MATHEMATICA
f[w_] := Block[{k}, k = Total@ w; Total@ Map[Apply[Function[{s, t}, s Array[Boole[t <= # <= s + t - 1] &, k] ], #] &, Apply[Join, Prepend[Table[Function[{v, c}, Map[{w[[k]], # + 1} &, Map[Total[v #] &, Tuples[{0, 1}, {Length@ v}]]]] @@ {Most@ #, ConstantArray[1, Length@ # - 1]} &@ Take[w, k], {k, 2, Length@ w}], {{w[[1]], 1}}]]] ]; g[n_] := Block[{w = {n}, c}, c[x_] := Apply[Times, Most@ x - Reverse@ Accumulate@ Reverse@ Rest@ x]; Reap[Do[Which[And[Length@ w == 2, SameQ @@ w], Sow[w]; Break[], Length@ w == 1, Sow[w]; AppendTo[w, 1], c[w] > 0, Sow[w]; AppendTo[w, 1], True, Sow[w]; w = MapAt[1 + # &, Drop[w, -1], -1] ], {i, Infinity}] ][[-1, 1]] ]; Block[{n = 40, a}, a = Merge[Map[<| #1 -> #2 |> & @@ # &, #], Identity] &@ TakeWhile[Sort@ Map[{Total@ #2, #1, #2} & @@ {#, f[#]} &, Apply[Join, Array[g, n]] ], First@ # <= n^2 &][[All, 1 ;; 2]]; Union@ FoldList[Max, Array[Length[Lookup[a, #] /. k_ /; MissingQ@ k -> {}] &, Length@ a]]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael De Vlieger, Jan 04 2019
STATUS
approved