OFFSET
1,1
COMMENTS
The magic sum of any 3 X 3 semimagic square composed of triangular numbers is a(n) + A000217(m) for some m and n.
EXAMPLE
16 = 1 + 15 = 6 + 10.
MATHEMATICA
r = 366; lst = Table[0, {r}]; lim = Floor[Sqrt[8*r - 7]]; Do[num = (i^2 + i)/2 + (j^2 + j)/2; If[num <= r, lst[[num]]++], {i, lim}, {j, i - 1}]; Flatten@Position[lst, n_ /; n > 1]
Module[{nn=30, trnos}, trnos=Accumulate[Range[nn]]; Select[Sort[Flatten[ Table[ PositionIndex[Counts[Total/@Subsets[trnos, {2}]]][i], {i, 2, nn}]]], #<= Last[trnos]&]] (* The program uses the PositionIndex and Counts functions from Mathematica version 10 *) (* Harvey P. Dale, Dec 26 2015 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Arkadiusz Wesolowski, Dec 02 2015
STATUS
approved