本帖最后由 王守恩 于 2021-10-10 08:14 编辑
谢谢 mathe!就是因为这里有众多大神罩着,我才赖在这里不走的。
譬如:在二进制中,恰好有a个0的(n+1)位数有几个?
Table[Table[CoefficientList[Series[(1 + x)^n, {x, 1, n}], x][[a + 1]], {n, a, 23}], {a, 0, 17}]
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,19, 20, 21, 22, 23},
{1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253},
{1, 4, 10, 20, 35,56, 84, 120, 165, 220, 286, 364, 455, 560, 680, 816, 969, 1140, 1330, 1540, 1771},
{1, 5, 15, 35, 70, 126, 210, 330, 495, 715, 1001,1365, 1820, 2380, 3060, 3876, 4845, 5985, 7315, 8855},
{1, 6, 21, 56, 126, 252, 462, 792, 1287, 2002, 3003, 4368, 6188, 8568, 11628, 15504, 20349, 26334, 33649},
{1, 7, 28, 84, 210, 462, 924, 1716, 3003, 5005, 8008, 12376, 18564, 27132, 38760, 54264, 74613, 100947},
{1, 8, 36, 120, 330, 792, 1716, 3432, 6435, 11440, 19448, 31824, 50388, 77520, 116280, 170544, 245157},
{1, 9, 45, 165, 495, 1287, 3003, 6435, 12870, 24310, 43758, 75582, 125970, 203490, 319770, 490314},
{1, 10, 55, 220, 715, 2002, 5005, 11440, 24310, 48620, 92378, 167960, 293930, 497420, 817190},
{1, 11, 66, 286, 1001, 3003, 8008, 19448, 43758, 92378, 184756, 352716, 646646, 1144066},
{1, 12, 78, 364, 1365, 4368, 12376, 31824, 75582, 167960, 352716, 705432, 1352078},
{1, 13, 91, 455, 1820, 6188, 18564, 50388, 125970, 293930, 646646, 1352078},
{1, 14, 105, 560, 2380, 8568, 27132, 77520, 203490, 497420, 1144066},
{1, 15, 120, 680, 3060, 11628, 38760, 116280, 319770, 817190},
{1, 16, 136, 816, 3876, 15504, 54264, 170544, 490314},
{1, 17, 153, 969, 4845, 20349, 74613, 245157},
{1, 18, 171, 1140, 5985, 26334, 100947}} |