A374087 a(n) is the number of ways to partition {1,2,...,n} into two sets X and Y such that the sum of the elements of each is a square.
1, 1, 0, 0, 1, 0, 0, 0, 1, 8, 0, 0, 0, 0, 0, 0, 365, 8, 0, 0, 0, 0, 0, 0, 0, 91514, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 104742767, 0, 0, 0, 6519062, 0, 0, 0, 0, 0, 0, 0, 0, 531168463492, 0, 0, 15329991499, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11530164811834907, 0, 0, 0, 0
Offset: 0
Keywords
Examples
If n = 4, then the only way is {1}, {2, 3, 4}. If n = 8, then the only way is { }, {1, 2, 3, 4, 5, 6, 7, 8}. If n = 9, there are 8 ways, which are shown below: {9}, {1, 2, 3, 4, 5, 6, 7, 8} {1, 8}, {2, 3, 4, 5, 6, 7, 9} {2, 7}, {1, 3, 4, 5, 6, 8, 9} {3, 6}, {1, 2, 4, 5, 7, 8, 9} {4, 5}, {1, 2, 3, 6, 7, 8, 9} {1, 2, 6}, {3, 4, 5, 7, 8, 9} {1, 3, 5}, {2, 4, 6, 7, 8, 9} {2, 3, 4}, {1, 5, 6, 7, 8, 9} In each of the 8 cases, the sum of the elements of the subsets are 9 and 36, respectively. If n = 25, there are 91514 ways. Some examples with sums different from each other: {1}, {2, 3, ..., 25}, where the sums are 1^2 and 18^2, respectively. {1, 2, 3, 4, 5, 6, 7, 8}, {9, 10, 11, ..., 25}, where the sums are 6^2 and 17^2. X = {6, 22, 23, 24, 25}, Y = {1, 2, ..., 25} - X, whose sums are 10^2 and 15^2.
Extensions
a(36)-a(68) from Alois P. Heinz, Jun 29 2024
Comments