Special about 2015 with conjecture?

In the question https://math.stackexchange.com/questions/1117581/is-there-something-special-about-2015/1118073#1118073 Jack D'Aurizio found a nice result: $$\dfrac{1^2+2^2+\cdots +77^2}{77}=2015.$$

Then I was wondering:

Is there a rectangular table $(7\times 11)$ that contains each square from $1^2$ to $77^2$, where the arithmetic mean of every row and every column equals $2015$?

• What Jack poses seems interesting. I think that for all "small" numbers we can "easily" find something interesting. Firstly I would recommend a lookup for 2015 in OEIS but in order to give mine, I have to give it some thought. – nickchalkida Sep 18 '15 at 6:58
• I believe the answer is negative by the pigeonhole principle. $2015=5\cdot 13\cdot 31$, so we have to be careful in distributing those squares in order that the sum along every row/column fits the contraints $\pmod{5},\pmod{13},\pmod{31}$. – Jack D'Aurizio Sep 18 '15 at 10:10
• oh, Now I don't know this problem is negative by now,Hope you answer @Mr Jack – user237685 Sep 18 '15 at 11:33
• Why this problem has been closed as "unclear what you're asking"? It looks to me that the question is pretty clear, indeed. – Jack D'Aurizio Sep 19 '15 at 14:58
• I have found a solution, in my answer below. – Empy2 Sep 30 '15 at 15:04

Here are numbers whose squares average 2015 on every row and every column.

3     6    77    15    18    70    63    26    52    48    33
5    72     8    73    56    19    25    50    43    34    44
57    68     9    14    32    20    59    28    37    66    51
71     7    13    55    16    49    61    53    38    45    35
76     4    46    65    17    21    23    54    27    42    58
2    64    75    31    74    29    22    24    39    30    41
1    10    11    12    60    69    36    62    67    40    47

Here is how I found it:
1. Find septets of squares that add up to $7\times2015$. Out of three billion candidates, there were about 200000 with the correct sum.
2. Find eleven septets that cover the range from $1$ to $77$, and don't intersect. I don't know how many elevenses there are, but by pruning the search, my routine found 178 elevens before I stopped the program.
3. Put the eleven septets in a $7\times11$ rectangle. All the columns have the correct average. Shuffle numbers within each column until the variance of the row sums is moderately small. I found 23 shuffled rectangles with low variance of row sums.
4. Take two rows, and splice them, Of the $2\times11$ numbers in two rows, and keeping each number in its column, there are $2^{11}=2048$ possible rows to choose. Pick the row, out of those 2048, that minimizes the variance of the row sum. Then take another two rows and splice them. After about 100 splicings of a matrix, I got very low variance of the row sums, and about one percent of the time, I got zero variance of the row sums. In other words, a solution.
EDIT : For what it's worth, and before 2015 ends, here is a solution where the average of the numbers is 39 in each row and column; and the average of the squares is 2015 in each row and column.

55    46     3    43    59    67    21    11    27    24    73
7    57    63     4    58    37    42    30    77    34    20
54     8    61    49    32    19    22    23    17    74    70
1    60    50    33    35    71    38    41    12    72    16
53    44    39    66     5    28    10    75    62    29    18
52     2     9    65    15    45    64    68    47    26    36
51    56    48    13    69     6    76    25    31    14    40
• So this refutes the previous answer then? – DanielWainfleet Oct 4 '15 at 4:48
• I think it does. – Empy2 Oct 4 '15 at 8:09
• The previous answer, showing it was impossible, has been deleted. Now we don't get to analyze it to find the fatal flaw. – DanielWainfleet Oct 4 '15 at 12:24
• I am very sorry. I thought my answer just had a minor, easily fixable flaw, but your answer clearly shows I was sooo wrong. Nice approach, and (+1). – Jack D'Aurizio Oct 4 '15 at 15:21
• Thanks. Sorry about your points though – Empy2 Oct 4 '15 at 20:22