What is the geometric 2-dimensional shape of the following sequence:
{1, 4, 8, 13, 20, 27, 36, 47, 58, 70, 83, 99, 116, 132, 151, 170, 192, 214, 238, 262, 287, 316, 343, 373, 405, 435, 468, 502, 539, 576, 613, 654, 693,...}
It is generated by this program:
(*Mathematica program start*)
nn = 32;
a4 = Table[
Total[Accumulate[
Sum[Table[
If[And[If[n^2 + k^2 <= r^2, If[n >= k, 1, 0], 0] == 1,
If[(n + 1)^2 + (k + 1)^2 <= r^2, If[n >= k, 1, 0], 0] == 0],
1, 0], {k, 0, r}], {n, 0, r}]]], {r, 0,
nn}]
(*Mathematica program end*)
This question is the first step that needs to be solved in order to answer this other question:
What is the shape of the set of integer sided acute triangles with largest side n?
I have tried programming this in a spreadsheet but I am not getting anywhere.
Trying to break down the question further: This arrayplot is closely related to the 14-th term of the sequence above:
r = 14;
ArrayPlot[
Table[Table[
If[And[If[n^2 + k^2 <= r^2, If[n >= k, 1, 0], 0] == 1,
If[(n + 1)^2 + (k + 1)^2 <= r^2, If[n >= k, 1, 0], 0] == 0], 1,
0], {k, 0, r}], {n, 0, r}]]
