对于集合{1, 2, 3, ..., n}, 有多少种子集, 能满足其中所有元素的和能被a整除。
a=1, {2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864},
a=2, {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432},
a=3, {1, 2, 4, 6, 12, 24, 44, 88, 176, 344, 688, 1376, 2736, 5472, 10944, 21856, 43712, 87424, 174784, 349568, 699136, 1398144, 2796288, 5592576, 11184896, 22369792},
a=4, {1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216},
a=5, {1, 1, 2, 4, 8, 14, 26, 52, 104, 208, 412, 820, 1640, 3280, 6560, 13112, 26216, 52432, 104864, 209728, 419440, 838864, 1677728, 3355456, 6710912, 13421792},
a=6, {1, 1, 2, 3, 6, 12, 22, 44, 88, 172, 344, 688, 1368, 2736, 5472, 10928, 21856, 43712, 87392, 174784, 349568, 699072, 1398144, 2796288, 5592448, 11184896},
a=7, {1, 1, 1, 3, 5, 10, 20, 38, 74, 146, 294, 586, 1172, 2344, 4684, 9364, 18724, 37452, 74900, 149800, 299600, 599192, 1198376, 2396744, 4793496, 9586984},
a=8, {1, 1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608},
a=9, {1, 1, 1, 2, 4, 8, 15, 30, 60, 116, 230, 458, 912, 1824, 3648, 7286, 14572, 29144, 58264, 116524, 233044, 466048, 932096, 1864192, 3728300, 7456600},
a=10,{1, 1, 1, 2, 4, 7, 13, 26, 52, 104, 206, 410, 820, 1640, 3280, 6556, 13108, 26216, 52432, 104864, 209720, 419432, 838864, 1677728, 3355456, 6710896},
a=11,{1, 1, 1, 1, 3, 6, 12, 24, 47, 94, 188, 374, 746, 1490, 2978, 5958, 11916, 23832, 47664, 95326, 190652, 381304, 762604, 1525204, 3050404, 6100804},
a=12,{1, 1, 1, 1, 3, 6, 11, 22, 44, 86, 172, 344, 684, 1368, 2736, 5464, 10928, 21856, 43696, 87392, 174784, 349536, 699072, 1398144, 2796224, 5592448},
a=13,{1, 1, 1, 1, 2, 5, 10, 20, 39, 79, 158, 316, 632, 1262, 2522, 5042, 10082, 20164, 40330, 80660, 161320, 322638, 645278, 1290556, 2581112, 5162224},
- Table[Count[Subsets[Range[n]], _?(Divisible[Total[#], a] &)], {a, 13}, {n, 26}]
复制代码 |