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.

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).

This page as a plain text file.
%I A244145 #35 Jul 23 2014 10:12:59
%S A244145 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,
%T A244145 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,
%U A244145 1,3,1,3,1,2,2,2,3,2,1,2,1,2,1,4,1,2,3
%N 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).
%C A244145 For more information about the symmetric representation of sigma(n) see A237593 and A237270.
%H A244145 Michel Marcus, <a href="/A244145/a244145_3.pdf">A colored version of the symmetric representation of sigma(n), multipage, n = 1..85</a>
%e A244145 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.
%e A244145    _ _ _ _
%e A244145   |_ _ _  |_
%e A244145   |_ _ _|   |_
%e A244145   |_ _  |_ _  |
%e A244145   |_ _|_  | | |
%e A244145   |_  | | | | |
%e A244145   |_|_|_|_|_|_|
%e A244145    1 2 3 4 5 6
%t A244145 (* path[n] computing the n-th Dyck path is defined in A237270 *)
%t A244145 (* canvasNamed[] creates a matrix with the labeled symmetric regions *)
%t A244145 (* adjacentPos[] computes list of bounding regions *)
%t A244145 extents[n_] := Map[Transpose[#] + {{1, 0}, {1, 0}}&, Transpose[{path[n-1], Most[Rest[path[n]]]}]]
%t A244145 squaresPos[n_] := DeleteDuplicates[Flatten[Map[Flatten[Outer[List, First[#], Last[#]], 1]&, Map[Apply[Range, #]&, extents[n], {2}]], 1]]
%t A244145 squaresNamed[n_] := Map[#->n&, squaresPos[n]]
%t A244145 canvasNamed[n_] := Module[{canvas = Table[0, {n}, {n}]}, ReplacePart[canvas, Flatten[Map[squaresNamed, Range[n]], 1]]]
%t A244145 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]
%t A244145 a244145[n_] := Module[{c = canvasNamed[n]}, Join[{0, 1, 1}, Map[Length[adjacentPos[#, c]]&, Range[4, n]]]]
%t A244145 a244145[87] (* computes the first 87 values *)
%t A244145 (* _Hartmut F. W. Hoft_, Jul 23 2014 *)
%Y A244145 Cf. A237270, A237271, A237593.
%K A244145 nonn
%O A244145 1,6
%A A244145 _Michel Marcus_, Jun 21 2014
%E A244145 a(85) corrected by _Hartmut F. W. Hoft_, Jul 23 2014