Solution:
The closest perfect square to 2015 is 2025=452 which means that only the rightmost side will be incomplete while the required diagonal would still have a total of 45 entries.
Looking at the values on the diagonal, we see that the numbers on the diagonal above 1 have a common second difference. This suggests that this sequence satisfies a quadratic function of the form f(n)=an2+bn+c. Since f(1)=1, f(2)=3, f(3)=13, solving a simple system of three equations gives us f(n)=4n2−10n+7, 1≤n≤23. On the other hand, the numbers on the diagonal below 1 also have a common second difference. This gives a sequence g(n)=dn2+en+f with g(1)=1, g(2)=7, and g(3)=21. By solving a similar system as above, we obtain g(n)=4n2−6n+3, where 1≤n≤23. Taking the sum of these two sequences of numbers, we have
n=1∑23[f(n)+g(n)]=n=1∑23(8n2−16n+10)=8n=1∑23n2−16n=1∑23n+n=1∑2310=8[6(23)(24)(47)]−16[2(23)(24)]+10(23)=30,406
Since 1 is counted twice, the required sum must be 30,406−1=30,405.