A321223 a(n) is the number of recursively self-conjugate partitions of n.
1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 2, 1, 0, 0, 1, 0, 1, 1, 0, 2, 1, 2, 0, 1, 0, 1, 1, 1, 1, 0, 1, 2, 2, 0, 1, 0, 0, 1, 2, 1, 2, 1, 1, 1, 2, 0, 0, 1, 0, 2, 1, 1, 1, 2, 1, 2, 1, 0, 1, 1, 0, 1, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 1, 2, 1, 0, 2, 1, 0, 1, 1, 1, 2, 2, 1, 1, 3, 0, 2
Offset: 1
Examples
a(2) = 0 since neither (2) nor (1,1) is recursively symmetrical. a(6) = 1 since the partition (3,2,1) of 6 is recursively symmetrical. S(3,2,1) = {2,1}. a(27) = 2 since both (6,6,6,3,3,3) and (6,5,5,5,5,1) are recursively self-conjugate. S(6,6,6,3,3,3) = {3,3}; S(6,5,5,5,5,1) = {5,1}. a(103) = 3 since there are 3 recursively self-conjugate partitions of 103: (13,13,13,10,10,10,7,6,6,6,3,3,3), (13,12,12,12,12,8,7,6,5,5,5,5,1), and (13,12,12,10,9,9,9,9,9,4,3,3,1). These can be stated in terms of recursive squares as {7,3,3}, {7,5,1}, and {9,3,1} respectively.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
- Michael De Vlieger, Diagrams of recursively self-conjugate partitions for 1 <= n <= 150.
- Michael De Vlieger, Graph of A321223(n) for 1 <= n <= 65536.
- Michael De Vlieger, Graph of A321223(n) for 1 <= n <= 65536, color coded mod 3.
- William J. Keith, Recursively Self-Conjugate Partitions, Integers 11A, (2011) Article 12.
Programs
-
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 = 12, 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]]; Array[Length[Lookup[a, #] /. k_ /; MissingQ@ k -> {}] &, Length@ a] ]
Comments