OFFSET
1,2
COMMENTS
LINKS
Robert Price, Table of n, a(n) for n = 1..10000
EXAMPLE
For n = 45 the symmetric representation of sigma(45) = 78 has three parts [23, 32, 23], both the first and the last term are equal to 23, so a(45) = 23.
MATHEMATICA
Map[First[a237270[#]]&, Range[64]] (* data : computing all parts *)
(* computing only the first part of the symmetric representation of sigma(n) *)
row[n_] := Floor[(Sqrt[8n+1]-1)/2] (* in A237591 *)
f[n_, k_] := If[Mod[n-k*(k+1)/2, k]==0, (-1)^(k+1), 0]
g[n_, k_] := Ceiling[(n+1)/k-(k+1)/2] - Ceiling[(n+1)/(k+1)-(k+2)/2] (* in A237591 *)
a241838[n_] := Module[{r=row[n], widths={}, i=1, w=0, len, legs}, w+=f[n, i]; While[i<=r && w!=0, AppendTo[widths, w]; i++; w+=f[n, i]]; len=Length[widths]; legs=Map[g[n, #]&, Range[len]]; If[len<r, widths.legs, 2*widths.legs-Last[widths]]]
Map[a241838, Range[64]] (* data *)
(* Hartmut F. W. Hoft, Jan 25 2018 *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Omar E. Pol, Apr 29 2014
STATUS
approved