A281972
Number of sets of exactly n positive integers <= n+9 having a square element sum.
Original entry on oeis.org
1, 3, 8, 26, 69, 166, 365, 750, 1446, 2646, 4645, 7856, 12852, 20411, 31626, 47910, 71022, 103342, 147982, 208554, 289572, 397140, 538319, 720965, 955716, 1255661, 1634233, 2108003, 2699453, 3431884, 4329465, 5426928, 6764353, 8377805, 10314695, 12640228
Offset: 0
a(1) = 3: {1}, {4}, {9}.
a(2) = 8: {1,3}, {1,8}, {2,7}, {3,6}, {4,5}, {5,11}, {6,10}, {7,9}.
A281973
Number of sets of exactly n positive integers <= n+10 having a square element sum.
Original entry on oeis.org
1, 3, 9, 33, 93, 242, 568, 1237, 2532, 4905, 9071, 16113, 27654, 45997, 74388, 117408, 181271, 274163, 407066, 594568, 855087, 1211979, 1695785, 2344564, 3204123, 4332497, 5802690, 7699864, 10126446, 13212343, 17109772, 21991217, 28071644, 35611707, 44895662
Offset: 0
a(0) = 1: {}.
a(1) = 3: {1}, {4}, {9}.
a(2) = 9: {1,3}, {1,8}, {2,7}, {3,6}, {4,5}, {4,12}, {5,11}, {6,10}, {7,9}.
A281994
Number of set partitions of [n] into subsets whose element sums are squares.
Original entry on oeis.org
1, 1, 0, 0, 1, 0, 1, 1, 7, 37, 22, 264, 310, 1181, 2350, 8102, 38471, 136528, 738072, 2811383, 12163208, 45121906, 160620225, 729516611, 3962353196
Offset: 0
a(0) = 1: {}.
a(1) = 1: 1.
a(4) = 1: 1|234.
a(6) = 1: 1|2356|4.
a(7) = 1: 1|27|36|45.
a(8) = 7: 12345678, 1258|367|4, 1267|358|4, 1357|268|4, 13|268|457, 178|2356|4, 18|27|36|45.
a(10) = 22: 1|234|5678(10)|9, 1|23569|4|78(10), 1|2356|4|78(10)|9, 1|23578|4|69(10), 1|23578|4|6(10)|9, 1|23678(10)|45|9, 1|24578(10)|36|9, 1|27|34568(10)|9, 1|258(10)|3679|4, 1|258(10)|367|4|9, 1|258(10)|36|4|79, 1|259|36|4|78(10), 1|267(10)|3589|4, 1|267(10)|358|4|9, 1|2689|357(10)|4, 1|268|357(10)|4|9, 1|27|3589|4|6(10), 1|27|358|4|69(10), 1|27|358|4|6(10)|9, 1|2789(10)|36|45, 1|27|3689(10)|45, 1|27|36|4589(10).
A377572
Total number of elements (with multiplicity) in all subsets of [n] having a square element sum.
Original entry on oeis.org
0, 1, 1, 3, 7, 12, 30, 61, 124, 247, 491, 980, 1962, 3949, 7916, 15863, 31815, 63692, 127570, 255529, 511627, 1024421, 2051038, 4105848, 8218842, 16450989, 32926094, 65897438, 131879440, 263915641, 528125412, 1056802576, 2114639286, 4231226460, 8466125334, 16939180972
Offset: 0
a(4) = 7: {1}, {4}, {1,3}, {2,3,4}.
a(5) = 12: {1}, {4}, {1,3}, {4,5}, {1,3,5}, {2,3,4}.
-
b:= proc(n, s) option remember; `if`(n=0, `if`(issqr(s),
[1, 0], 0), b(n-1, s)+(p-> p+[0, p[1]])(b(n-1, s+n)))
end:
a:= n-> b(n, 0)[2]:
seq(a(n), n=0..35);