login
A244145
Number of positive integers k less than n such that the symmetric representation of sigma(k) is contiguous (shares a line border) with the symmetric representation of sigma(n).
6
0, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 3, 3, 1, 2, 1, 2, 1, 2, 3, 3, 1, 2, 2, 3, 1, 2, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 1, 3, 1, 2, 1, 2, 1, 4, 1, 2, 2, 3, 1, 2, 1, 2, 1, 3, 1, 3, 1, 2, 2, 2, 3, 2, 1, 2, 1, 2, 1, 4, 1, 2, 3
OFFSET
1,6
COMMENTS
For more information about the symmetric representation of sigma(n) see A237593 and A237270.
EXAMPLE
For n = 6 the symmetric representation of sigma(6) (the outer one in the figure below) touches those for n = 4 and n = 5, so a(6) = 2.
_ _ _ _
|_ _ _ |_
|_ _ _| |_
|_ _ |_ _ |
|_ _|_ | | |
|_ | | | | |
|_|_|_|_|_|_|
1 2 3 4 5 6
MATHEMATICA
(* path[n] computing the n-th Dyck path is defined in A237270 *)
(* canvasNamed[] creates a matrix with the labeled symmetric regions *)
(* adjacentPos[] computes list of bounding regions *)
extents[n_] := Map[Transpose[#] + {{1, 0}, {1, 0}}&, Transpose[{path[n-1], Most[Rest[path[n]]]}]]
squaresPos[n_] := DeleteDuplicates[Flatten[Map[Flatten[Outer[List, First[#], Last[#]], 1]&, Map[Apply[Range, #]&, extents[n], {2}]], 1]]
squaresNamed[n_] := Map[#->n&, squaresPos[n]]
canvasNamed[n_] := Module[{canvas = Table[0, {n}, {n}]}, ReplacePart[canvas, Flatten[Map[squaresNamed, Range[n]], 1]]]
adjacentPos[n_, matrix_] := Drop[DeleteDuplicates[Flatten[Map[{matrix[[Apply[Sequence, # + {-1, 0}]]], matrix[[Apply[Sequence, # + {0, -1}]]]}&, Drop[Drop[squaresPos[n], 1], -1]], 1]], 1]
a244145[n_] := Module[{c = canvasNamed[n]}, Join[{0, 1, 1}, Map[Length[adjacentPos[#, c]]&, Range[4, n]]]]
a244145[87] (* computes the first 87 values *)
(* Hartmut F. W. Hoft, Jul 23 2014 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Jun 21 2014
EXTENSIONS
a(85) corrected by Hartmut F. W. Hoft, Jul 23 2014
STATUS
approved