Partition the numbers from 1 to n into sets with the same square sums

For example,

partitioning

{3,4,5} ……………………   $3^2 + 4^2 = 5^2$
{2,3,4,5,6} ………………   $2^2 + 4^2 + 5^2 = 3^2 + 6^2 = 45$
{5,6,7,8,9,10,11} ………   $5^2 + 7^2 + 8^2 + 10^2 = 6^2 + 9^2 + 11^2 = 238$

{1,2,3,4,5,6,7,8}
$1 + 4 + 6 + 7 \; = \; 2 + 3 + 5 + 8 \; = \; 18$
$1^2 + 4^2 + 6^2 + 7^2 \; = \; 2^2 + 3^2 + 5^2 + 8^2 \; = \; 102$

partitioning the numbers from 1 to 12 into sets with the same square sums:

$11^2 + 10^2 + 8^2 + 6^2 + 2^2 = 12^2 + 9^2 + 7^2 + 5^2 + 4^2 + 3^2 + 1^2 = 325$

partitioning the numbers from 1 to 16 into sets with the same sums and square sums

$1 + 4 + 6 + 7 + 10 + 11 + 13 + 16 \; = \; 2 + 3 + 5 + 8 + 9 + 12 + 14 + 15 \; = \; 68$

$1^2 + 4^2 + 6^2 + 7^2 + 10^2 + 11^2 + 13^2 + 16^2$
$= \; 2^2 + 3^2 + 5^2 + 8^2 + 9^2 + 12^2 + 14^2 + 15^2$
$= \; 748$

$1^3 + 4^3 + 6^3 + 7^3 + 10^3 + 11^3 + 13^3 + 16^3$
$= \; 2^3 + 3^3 + 5^3 + 8^3 + 9^3 + 12^3 + 14^3 + 15^3$
$= \; 9248$

partitioning the numbers from 1 to 20 into sets with the same square sums:

$1^2 + 2^2 + 3^2 + 4^2 + 5^2 + 7^2 + 10^2 + 11^2 + 13^2 + 16^2 + 18^2 + 19^2$
$= 6^2 + 8^2 + 9^2 + 12^2 + 14^2 + 15^2 + 17^2 + 20^2$
$= 1435$

from 1 to 28:

$27^2 + 26^2 + 25^2 + 18^2 + 17^2 + 16^2 + 15^2 + 14^2 + 13^2 + 11^2 + 9^2 + 8^2 + 7^2 + 6^2 + 4^2 + 1^2$
$= 28^2 + 24^2 + 23^2 + 22^2 + 21^2 + 20^2 + 19^2 + 12^2 + 10^2 + 5^2 + 3^2 + 2^2$
$= 3857$

partitioning the numbers from 1 to 32 into sets with the same sums and square sums

$1+4+6+7+10+11+13+16+18+19+21+24+25+28+30+31$
$= \; 2+3+5+8+9+12+14+15+17+20+22+23+26+27+29+32$
$= \; 264$

$1^2+4^2+6^2+7^2+10^2+11^2+13^2+16^2+18^2+19^2+21^2+24^2+25^2+28^2+30^2+31^2$
$= \; 2^2+3^2+5^2+8^2+9^2+12^2+14^2+15^2+17^2+20^2+22^2+23^2+26^2+27^2+29^2+32^2$
$= \; 5720$

$1^3+4^3+6^3+7^3+10^3+11^3+13^3+16^3+18^3+19^3+21^3+24^3+25^3+28^3+30^3+31^3$
$= \; 2^3+3^3+5^3+8^3+9^3+12^3+14^3+15^3+17^3+20^3+22^3+23^3+26^3+27^3+29^3+32^3$
$= \; 139392$

$1^4+4^4+6^4+7^4+10^4+11^4+13^4+16^4+18^4+19^4+21^4+24^4+25^4+28^4+30^4+31^4$
$= \; 2^4+3^4+5^4+8^4+9^4+12^4+14^4+15^4+17^4+20^4+22^4+23^4+26^4+27^4+29^4+32^4$
$= \; 3623048$

(1)   partition the numbers from 1 to 64 inclusive into 4 sets with the same sums and square sums

(2)   partition the numbers from 1 to 256 inclusive into 4 sets with the same sums, square sums, and cube sums

(3)   partition the numbers from 1 to 125 inclusive into 5 sets with the same sums and square sums

Generalize all of this.