数学研发论坛

 找回密码
 欢迎注册
楼主: lsr314

[讨论] 一类线性不定方程 x_1+2x_2+...+kx_k=n 非负整数解的数目

[复制链接]
发表于 2019-1-7 10:31:56 | 显示全部楼层
$f_1(n)=1$
所以设$f_2(n)=a_{2,1}n+a_{2,0}+b_{2,2,1} (-1)^n$
利用$f_2(n)-f_2(n-2)=f_1(n)=1$,得出$2a_{2,1}=1$,所以$a_{2,1}=1/2$
由于$f_2(0)=f_2(1)=1$,所以我们有$a_{2,0}+b_{2,2,1}=1,1/2+a_{2,0}-b_{2,2,1}=1$
所以$a_{2,0}=3/4,b_{2,2,1}=1/4$
由此得出$f_2(n)=n/2+3/4+1/4 (-1)^n$
设$f_3(n)=a_{3,2}n^2+a_{3,1}n+a_{3,0}+b_{3,2,1}(-1)^n+b_{3,3,1} w_3^n+b_{3,3,2}w_3^{2n}$
利用$f_3(n)-f_3(n-3)=f_2(n)=n/2+3/4+1/4 (-1)^n$
得出
$a_{3,2}(n^2-(n-3)^2)+3a_{3,1}+2b_{3,2,1}(-1)^n=n/2+3/4+1/4(-1)^n$
得到
$6a_{3,2}n-9a_{3,2}+3a_{3,1}+2b_{3,2,1}(-1)^n=n/2+3/4+1/4(-1)^n$
所以$b_{3,2,1}=1/8,a_{3,2}=1/12,a_{3,1}=1/2$
而$f_3(0)=f_2(0)=1,f_3(1)=f_2(1)=1,f_3(2)=f_2(2)=2$
得出
\(\begin{cases}a_{3,0}+\frac18+b_{3,3,1}+b_{3,3,2}=1\\
\frac{1}{12}+\frac12+a_{3,0}-\frac18+b_{3,3,1}w_3+b_{3,3,2}w_3^2=1\\
\frac{2^2}{12}+\frac22+a_{3,0}+\frac18+b_{3,3,1}w_3^2+b_{3,3,2}w_3^4=2
\end{cases}\)
这个手工计算已经有点太复杂了
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2019-1-7 11:49:56 | 显示全部楼层
上面方法推广到k=4时开始遇到另外一个问题,由于$w_2^4$,这回导致$f_4(n)-f_4(n-4)$的计算中$w_2^n$中系数全部抵消
由此,我们需要改为假设$f_4(n)$中$w_2^n$的系数为$(n*c_{4,2,t})w_2^n$而不是$b_{4,2,t}w_2^n$
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2019-1-7 12:29:02 | 显示全部楼层
https://en.wikipedia.org/wiki/Q-Pochhammer_symbol
验算的时候可以用 线性差分方程。
设: \[f[n+d]=a_1\cdot f[n+d-1]+ a_2\cdot f[n+d-2]+...+ a_d\cdot f[n],  f[1]=f_1,  f[2]=f_2,...., f[d]=f_d\]
那么对于不同的$k$,计算得到$f_k(n)$满足的差分方程是$d$阶,$d=\frac{k(k+1)}{2}$:
${k, d, {a_1,a_2,...a_d}, {f_1,f_2,...,f_d}}$

  1. {1,1,{{1},{1}}}
  2. {2,3,{{1,1,-1},{1,1,2}}}
  3. {3,6,{{1,1,0,-1,-1,1},{1,1,2,3,4,5}}}
  4. {4,10,{{1,1,0,0,-2,0,0,1,1,-1},{1,1,2,3,5,6,9,11,15,18}}}
  5. {5,15,{{1,1,0,0,-1,-1,-1,1,1,1,0,0,-1,-1,1},{1,1,2,3,5,7,10,13,18,23,30,37,47,57,70}}}
  6. {6,21,{{1,1,0,0,-1,0,-2,0,1,1,1,1,0,-2,0,-1,0,0,1,1,-1},{1,1,2,3,5,7,11,14,20,26,35,44,58,71,90,110,136,163,199,235,282}}}
  7. {7,28,{{1,1,0,0,-1,0,-1,-1,0,1,1,2,0,0,0,-2,-1,-1,0,1,1,0,1,0,0,-1,-1,1},{1,1,2,3,5,7,11,15,21,28,38,49,65,82,105,131,164,201,248,300,364,436,522,618,733,860,1009,1175}}}
  8. {8,36,{{1,1,0,0,-1,0,-1,0,-1,0,1,2,1,0,1,-1,-1,-2,-1,-1,1,0,1,2,1,0,-1,0,-1,0,-1,0,0,1,1,-1},{1,1,2,3,5,7,11,15,22,29,40,52,70,89,116,146,186,230,288,352,434,525,638,764,919,1090,1297,1527,1801,2104,2462,2857,3319,3828,4417,5066}}}
  9. {9,45,{{1,1,0,0,-1,0,-1,0,0,-1,0,2,1,1,1,0,-1,-1,-1,-2,-1,-1,1,1,2,1,1,1,0,-1,-1,-1,-2,0,1,0,0,1,0,1,0,0,-1,-1,1},{1,1,2,3,5,7,11,15,22,30,41,54,73,94,123,157,201,252,318,393,488,598,732,887,1076,1291,1549,1845,2194,2592,3060,3589,4206,4904,5708,6615,7657,8824,10156,11648,13338,15224,17354,19720,22380}}}
  10. {10,55,{{1,1,0,0,-1,0,-1,0,0,0,-1,1,1,1,2,0,0,-1,-1,-1,-1,-3,0,0,1,1,2,2,1,1,0,0,-3,-1,-1,-1,-1,0,0,2,1,1,1,-1,0,0,0,-1,0,-1,0,0,1,1,-1},{1,1,2,3,5,7,11,15,22,30,42,55,75,97,128,164,212,267,340,423,530,653,807,984,1204,1455,1761,2112,2534,3015,3590,4242,5013,5888,6912,8070,9418,10936,12690,14663,16928,19466,22367,25608,29292,33401,38047,43214,49037,55494,62740,70760,79725,89623,100654}}}
  11. {11,66,{{1,1,0,0,-1,0,-1,0,0,0,0,0,0,1,2,1,0,0,-1,-1,-1,-2,-1,-1,0,-1,2,2,2,2,1,1,0,-1,-1,-2,-2,-2,-2,1,0,1,1,2,1,1,1,0,0,-1,-2,-1,0,0,0,0,0,0,1,0,1,0,0,-1,-1,1},{1,1,2,3,5,7,11,15,22,30,42,56,76,99,131,169,219,278,355,445,560,695,863,1060,1303,1586,1930,2331,2812,3370,4035,4802,5708,6751,7972,9373,11004,12866,15021,17475,20298,23501,27169,31316,36043,41373,47420,54218,61903,70515,80215,91058,103226,116792,131970,148847,167672,188556,211782,237489,266006,297495,332337,370733,413112,459718}}}
  12. {12,78,{{1,1,0,0,-1,0,-1,0,0,0,0,1,-1,0,2,1,1,0,0,-1,-1,-2,-1,-1,0,-2,0,1,2,2,2,2,1,1,0,-1,-2,-1,-4,-1,-2,-1,0,1,1,2,2,2,2,1,0,-2,0,-1,-1,-2,-1,-1,0,0,1,1,2,0,-1,1,0,0,0,0,-1,0,-1,0,0,1,1,-1},{1,1,2,3,5,7,11,15,22,30,42,56,77,100,133,172,224,285,366,460,582,725,905,1116,1380,1686,2063,2503,3036,3655,4401,5262,6290,7476,8877,10489,12384,14552,17084,19978,23334,27156,31570,36578,42333,48849,56297,64707,74287,85067,97299,111036,126560,143948,163540,185425,210005,237405,268079,302196,340293,382562,429636,481769,539672,603666,674585,752802,839286,934502,1039543,1154981,1282083,1421506,1574714,1742509,1926533,2127747}}}
  13. {13,91,{{1,1,0,0,-1,0,-1,0,0,0,0,1,0,-1,1,1,1,1,0,0,-1,-2,-1,-1,-1,-1,0,-1,1,1,2,2,2,2,2,0,-1,-1,-2,-1,-3,-3,-2,-1,-1,1,1,2,3,3,1,2,1,1,0,-2,-2,-2,-2,-2,-1,-1,1,0,1,1,1,1,2,1,0,0,-1,-1,-1,-1,1,0,-1,0,0,0,0,1,0,1,0,0,-1,-1,1},{1,1,2,3,5,7,11,15,22,30,42,56,77,101,134,174,227,290,373,471,597,747,935,1158,1436,1763,2164,2637,3210,3882,4691,5635,6761,8073,9624,11424,13542,15988,18847,22142,25971,30366,35452,41269,47968,55610,64370,74331,85711,98609,113287,129883,148702,169919,193906,220877,251274,285373,323689,366566,414624,468273,528245,595056,669555,752368,844504,946708,1060163,1185776,1324916,1478670,1648649,1836130,2042987,2270754,2521589,2797302,3100410,3433027,3798063,4198013,4636214,5115586,5639989,6212802,6838459,7520910,8265217,9075952,9958931}}}
  14. {14,105,{{1,1,0,0,-1,0,-1,0,0,0,0,1,0,0,0,0,1,1,1,0,0,-2,-1,-1,-1,-2,0,0,0,0,1,1,2,2,3,2,0,0,-1,0,-3,-2,-3,-2,-3,-1,-1,0,1,3,2,3,3,2,3,1,0,-1,-1,-3,-2,-3,-2,-3,0,-1,0,0,2,3,2,2,1,1,0,0,0,0,-2,-1,-1,-1,-2,0,0,1,1,1,0,0,0,0,1,0,0,0,0,-1,0,-1,0,0,1,1,-1},{1,1,2,3,5,7,11,15,22,30,42,56,77,101,135,175,229,293,378,478,608,762,957,1188,1478,1819,2241,2738,3345,4057,4920,5928,7139,8551,10232,12186,14499,17176,20325,23961,28212,33104,38797,45326,52888,61538,71509,82882,95943,110795,127786,147059,169027,193880,222118,253981,290071,330699,376577,428104,486133,551155,624188,705851,797341,899427,1013531,1140588,1282281,1439757,1614987,1809369,2025226,2264234,2529120,2821909,3145777,3503153,3897751,4332454,4811594,5338601,5918495,6555343,7254976,8022171,8863685,9785144,10794337,11897861,13104708,14422567,15861795,17431358,19143136,21007554,23038248,25247274,27650253,30261132,33097743,36176175,39516787,43138066,47063214}}}
  15. {15,120,{{1,1,0,0,-1,0,-1,0,0,0,0,1,0,0,1,-1,0,1,1,1,0,-1,-1,-1,-1,-2,-1,0,0,0,1,0,1,1,3,2,2,1,0,1,-1,-2,-3,-2,-3,-2,-2,-2,-1,0,0,3,3,3,3,4,2,2,1,0,-1,-2,-2,-4,-3,-3,-3,-3,0,0,1,2,2,2,3,2,3,2,1,-1,0,-1,-2,-2,-3,-1,-1,0,-1,0,0,0,1,2,1,1,1,1,0,-1,-1,-1,0,1,-1,0,0,-1,0,0,0,0,1,0,1,0,0,-1,-1,1},{1,1,2,3,5,7,11,15,22,30,42,56,77,101,135,176,230,295,381,483,615,773,972,1210,1508,1861,2297,2815,3446,4192,5096,6158,7434,8932,10715,12801,15272,18148,21535,25469,30073,35401,41612,48772,57080,66634,77667,90316,104875,121510,140587,162331,187175,215415,247587,284054,325472,372311,425349,485184,552767,628822,714504,810726,918851,1040014,1175862,1327763,1497696,1687344,1899041,2134841,2397537,2689583,3014304,3374676,3774599,4217657,4708477,5251305,5851608,6514463,7246258,8053039,8942320,9921212,10998526,12182681,13483920,14912165,16479384,18197166,20079452,22139835,24394441,26859162,29552711,32493532,35703292,39203452,43018955,47174701,51699468,56621986,61975379,67792847,74112342,80972138,88415780,96487178,105236197,114713263,124975255,136079959,148092302,161078251,175111785,190268239,206631638,224287850}}}
  16. {16,136,{{1,1,0,0,-1,0,-1,0,0,0,0,1,0,0,1,0,-1,0,1,1,1,-1,0,-1,-1,-2,-1,-1,0,0,0,1,1,0,2,1,2,2,1,2,0,0,-2,-2,-3,-2,-3,-2,-2,-1,-3,1,1,2,3,3,3,4,4,2,2,0,0,-2,-2,-3,-3,-6,-3,-3,-2,-2,0,0,2,2,4,4,3,3,3,2,1,1,-3,-1,-2,-2,-3,-2,-3,-2,-2,0,0,2,1,2,2,1,2,0,1,1,0,0,0,-1,-1,-2,-1,-1,0,-1,1,1,1,0,-1,0,1,0,0,1,0,0,0,0,-1,0,-1,0,0,1,1,-1},{1,1,2,3,5,7,11,15,22,30,42,56,77,101,135,176,231,296,383,486,620,780,983,1225,1530,1891,2339,2871,3523,4293,5231,6334,7665,9228,11098,13287,15892,18928,22518,26694,31603,37292,43951,51643,60603,70927,82898,96650,112540,130738,151685,175618,203067,234343,270105,310748,357075,409603,469300,536827,613370,699749,797402,907376,1031391,1170752,1327547,1503381,1700763,1921687,2169146,2445589,2754612,3099186,3483604,3911503,4387969,4917406,5505879,6158681,6882999,7685215,8573805,9556420,10643083,11842899,13167672,14628270,16238532,18011351,19962988,22108669,24467421,27057241,29900320,33017843,36435710,40178747,44277097,48759872,53662038,59017600,64867140,71250256,78213911,85804198,94075330,103080807,112883201,123544419,135136517,147731106,161410965,176258706,192369399,209838123,228773823,249285839,271498778,295538106,321546251,349666857,380062426,412897300,448356535,486627762,527921587,572451830,620457761,672182817,727898397,787881177,852438748,921885011,996568049,1076843687}}}
  17. {17,153,{{1,1,0,0,-1,0,-1,0,0,0,0,1,0,0,1,0,0,-1,0,1,1,0,0,0,-1,-2,-1,-1,-1,0,0,0,1,1,2,0,1,1,2,2,1,1,0,-1,-2,-2,-3,-2,-3,-2,-3,-1,0,0,1,2,1,4,4,4,4,3,2,1,0,-1,-2,-3,-4,-4,-4,-5,-3,-3,-2,-2,2,2,3,3,5,4,4,4,3,2,1,0,-1,-2,-3,-4,-4,-4,-4,-1,-2,-1,0,0,1,3,2,3,2,3,2,2,1,0,-1,-1,-2,-2,-1,-1,0,-2,-1,-1,0,0,0,1,1,1,2,1,0,0,0,-1,-1,0,1,0,0,-1,0,0,-1,0,0,0,0,1,0,1,0,0,-1,-1,1},{1,1,2,3,5,7,11,15,22,30,42,56,77,101,135,176,231,297,384,488,623,785,990,1236,1545,1913,2369,2913,3579,4370,5332,6469,7841,9459,11395,13671,16380,19551,23303,27684,32839,38837,45864,54012,63516,74506,87268,101982,119009,138579,161144,187013,216738,250723,289656,334051,384759,442442,508137,582691,667382,763265,871908,994644,1133373,1289761,1466126,1664525,1887776,2138425,2419869,2735245,3088663,3483945,3926046,4419640,4970660,5584788,6269144,7030589,7877643,8818588,9863566,11022546,12307608,13730675,15306097,17048139,18973777,21100014,23446933,26034715,28887061,32027901,35485108,39286987,43466299,48056390,53095685,58623438,64684584,71325208,78597815,86556353,95262050,104777975,115175344,126527740,138917916,152431480,167164418,183216214,200697952,219725005,240425789,262933808,287397261,313970423,342823986,374135921,408102604,444928907,484840401,528072644,574884275,625545678,680353067,739616248,803673975,872880769,947623402,1028306966,1115372556,1209282272,1310538472,1419667673,1537241148,1663857953,1800167013,1946848910,2104639829,2274312060,2456699633,2652677784,2863190371,3089227913,3331857268,3592198201,3871455062,4170892164,4491867656,4835807257,5204240813}}}
  18. {18,171,{{1,1,0,0,-1,0,-1,0,0,0,0,1,0,0,1,0,0,0,-1,0,1,0,1,0,0,-2,-1,-1,-1,-1,0,0,0,1,2,1,1,0,1,2,1,1,1,1,-1,-1,-2,-2,-3,-2,-4,-2,-2,0,0,1,-1,2,3,3,4,4,4,3,3,1,1,-1,-1,-3,-4,-5,-4,-5,-3,-6,-2,-2,-1,0,3,3,4,5,5,5,5,4,3,3,0,-1,-2,-2,-6,-3,-5,-4,-5,-4,-3,-1,-1,1,1,3,3,4,4,4,3,3,2,-1,1,0,0,-2,-2,-4,-2,-3,-2,-2,-1,-1,1,1,1,1,2,1,0,1,1,2,1,0,0,0,-1,-1,-1,-1,-2,0,0,1,0,1,0,-1,0,0,0,1,0,0,1,0,0,0,0,-1,0,-1,0,0,1,1,-1},{1,1,2,3,5,7,11,15,22,30,42,56,77,101,135,176,231,297,385,489,625,788,995,1243,1556,1928,2391,2943,3621,4426,5409,6570,7976,9635,11626,13968,16765,20040,23928,28472,33834,40080,47420,55940,65907,77449,90889,106408,124418,145149,169120,196648,228364,264691,306421,354091,408687,470914,541971,622771,714802,819205,937815,1072093,1224262,1396169,1590544,1809674,2056896,2335073,2648233,2999936,3395084,3838036,4334733,4890554,5512631,6207559,6983946,7849794,8815458,9890681,11087828,12418715,13898152,15540349,17362993,19383212,21622010,24099950,26842017,29872751,33221794,36918455,40997739,45494546,50450245,55906184,61911143,68514119,75772412,83743923,92495967,102096702,112625043,124161187,136797354,150627690,165759933,182304231,200386212,220134669,241695691,265219551,290876034,318839992,349308404,382484542,418596398,457879844,500598571,547025609,597465444,652233831,711681629,776173368,846113000,921920479,1004060187,1093015438,1189319093,1293526517,1406248590,1528122264,1659846876,1802152215,1955837546,2121737797,2300765584,2493874519,2702105273,2926545891,3168381262,3428851152,3709303371,4011148392,4335917455,4685213639,5060774155,5464418681,5898116246,6363929521,6864087689,7400926549,7976966566,8594849726,9257423191,9967671420,10728807090,11544198307,12417465866,13352406616,14353097610,15423813949,16569141670,17793889888,19103211434,20502510514,21997571702,23594461204,25299666403}}}
  19. {19,190,{{1,1,0,0,-1,0,-1,0,0,0,0,1,0,0,1,0,0,0,0,-1,0,0,1,1,0,-1,-1,-1,-1,-1,-1,0,0,0,2,1,1,1,1,1,1,0,1,1,1,0,-1,-1,-2,-2,-4,-2,-3,-2,-1,0,-1,1,1,2,3,3,3,4,4,3,3,2,1,1,-2,-3,-4,-5,-4,-5,-4,-5,-4,-4,-1,-1,1,2,4,4,6,5,6,7,5,3,3,1,0,-1,-3,-3,-5,-7,-6,-5,-6,-4,-4,-2,-1,1,1,4,4,5,4,5,4,5,4,3,2,-1,-1,-2,-3,-3,-4,-4,-3,-3,-3,-2,-1,-1,1,0,1,2,3,2,4,2,2,1,1,0,-1,-1,-1,0,-1,-1,-1,-1,-1,-1,-2,0,0,0,1,1,1,1,1,1,0,-1,-1,0,0,1,0,0,0,0,-1,0,0,-1,0,0,0,0,1,0,1,0,0,-1,-1,1},{1,1,2,3,5,7,11,15,22,30,42,56,77,101,135,176,231,297,385,490,626,790,998,1248,1563,1939,2406,2965,3651,4468,5465,6647,8077,9770,11802,14199,17062,20425,24418,29098,34624,41078,48668,57503,67846,79855,93854,110059,128886,150614,175767,204725,238134,276493,320620,371153,429112,495332,571069,657395,755880,867873,995318,1139939,1304117,1490023,1700603,1938560,2207510,2510840,2852958,3238070,3671577,4158656,4705886,5319666,6007963,6778628,7641341,8605674,9683331,10885999,12227767,13722832,15388175,17240952,19301553,21590722,24132850,26952908,30080087,33544328,37380450,41624341,46317405,51502509,57228873,63547525,70516817,78197450,86658411,95971690,106218799,117484877,129865995,143462740,158388076,174760540,192712841,212384318,233930540,257515119,283320032,311536956,342378543,376068865,412855929,453001359,496793848,544538255,596570261,653244408,714950321,782099826,855144369,934561444,1020873540,1114633320,1216444505,1326945978,1446834212,1576846549,1717785546,1870500807,2035915741,2215008144,2408838905,2618531645,2845303839,3090444780,3355349681,3641496212,3950481088,4283995521,4643864815,5032021932,5450550775,5901658144,6387720133,6911252893,7474962795,8081715067,8734588496,9436842290,10191974710,11003688631,11875954836,12812975259,13819251870,14899547988,16058962078,17302887704,18637093131,20067678764,21601163602,23244440663,25004869578,26890230647,28908824595,31069423999,33381381470,35854579015,38499543853,41327396501,44349975450,47579782574,51030118097,54715024029,58649428629,62849088755,67330745235,72112062630,77211797218,82649734981,88446871333,94625348422,101208648288,108221527829,115690227333,123642404108}}}
复制代码



经过检验,楼主2#的$f_5(n)$是正确的,$f_6(n)$就出现了问题。

附代码:
  1. m = 15; Table[{k,
  2. data = CoefficientList[Series[QPochhammer[q^(k + 1), q]/QPochhammer[q, q], {q, 0, m^2 + m}], q];  kernel = FindLinearRecurrence[data]; Length[kernel], {kernel, data[[1 ;; Length[kernel]]]}}
  3. , {k, m}]
复制代码


点评

只是还得不到楼主的那种分段的绝对值表达式  发表于 2019-1-8 17:42
原则上是可以的解出来的  发表于 2019-1-8 17:41
应该可以用差分方程求出最终表达式(级数解,只需取到n^-2阶就可以了  发表于 2019-1-8 07:56
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2019-1-8 10:34:17 | 显示全部楼层
$f_k(n)$通项公式我们可以看成有两部分,第一部分是特征值1对应的部分,是一个关于n的k次多项式
第二部分是对于各个h次单位根$w_h^s$,其中$2<=h<=k$,它们会产生$b_{k,h,s}n^{\alpha_{k,h}}w_h^{sn}$
其中$\alpha_{k,h}$代表了$h+1$到$k$之间$h$的倍数的数目,而其中$b_{k,h,s}$通常都比较小(应该都小于1)
其结果就是如果我们抛弃所有$\alpha_{k,h}=0$项,那么得到结果会很真实结果偏差不大,就可以通过四舍五入的方法得到真实结果。
由此,我们知道,对于k=1,2,3时,由于$2+1$到$k$之间没有$2$的倍数,所以只需要取特征值1对应的部分即可,所以就是一个n的k次多项式的四舍五入
而对于k=4,5时,由于$2+1$到$k$之间有了$2$的倍数,但是$3+1$到$k$之间没有$3$的倍数,所以结果只需要取特征值1和-1对应的部分,再四舍五入即可,这也是为什么楼主的公式里面k=4,5时出现了$(-1)^n$
但是对于k=6,7时,我们就要把$h=3$的情况也计入了,因为出现3的倍数了,所以即使四舍五入,也要保留2个3次单位根对应的项
而如果对于k=8,9,我们还要把四次单位根对应的项也添加进去了,...

点评

所以这个要跟 整数的质因分解有关了  发表于 2019-1-8 17:28
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2019-1-8 18:40:05 | 显示全部楼层
根据13# wayne提供的差分方程,可以求解得到如下结果( 舍去小量部分):

\(f_2(n)=\lceil\frac{3+2n}{4}+\frac{(-1)^n}{4}\rfloor\)

\(f_3(n)=\lceil\frac{n^2}{12}+\frac{(-1)^n}{8}+\frac{n}{2}+\frac{47}{72}\rfloor\)

\(f_4(n)=\lceil\frac{n^3}{144}+\frac{5n^2}{48}+(\frac{(-1)^n}{32}+\frac{15}{32})n+\frac{5(-1)^n}{32}+\frac{175}{288}\rfloor\)

\(f_5(n)=\lceil\frac{n^4}{2880}+\frac{n^3}{96}+\frac{31n^2}{288}+(\frac{(-1)^n}{64}+\frac{85}{192})n+\frac{15(-1)^n}{128}+\frac{50651}{86400}\rfloor\)

\(f_6(n)=\lceil\frac{n^5}{86400}+\frac{7n^4}{11520}+\frac{77n^3}{6480}+(\frac{(-1)^n}{768}+\frac{245}{2304})n^2+(\frac{7(-1)^n}{256}+\frac{43981}{103680})n+\frac{581(-1)^n}{4608}+\frac{199577}{345600}\rfloor\)

\(f_7(n)=\lceil\frac{n^6}{3628800}+\frac{n^5}{43200}+\frac{79n^4}{103680}+\frac{161n^3}{12960}+(\frac{(-1)^n}{1536}+\frac{3991}{38400})n^2+(\frac{7(-1)^n}{384}+\frac{21343}{51840})n+\frac{511(-1)^n}{4608}+\frac{87797891}{152409600}\rfloor\)

\(f_8(n)=\lceil\frac{n^7}{203212800}+\frac{n^6}{1612800}+\frac{307n^5}{9676800}+\frac{13n^4}{15360}+(\frac{(-1)^n}{36864}+\frac{728681}{58060800})n^3+(\frac{3(-1)^n}{2048}+\frac{15599}{153600})n^2+(\frac{293(-1)^n}{12288}+\frac{2812349}{6967296})n+\frac{231(-1)^n}{2048}+\frac{39226571}{67737600}\rfloor\)

\(f_9(n)=\lceil\frac{(n^2+45n+705/2)(n+45/2)(-1)^n}{73728}+\frac{n^8}{14631321600}+\frac{n^7}{81285120}+\frac{193n^6}{209018880}+\frac{29n^5}{774144}+\frac{464921n^4}{522547200}+\frac{290309n^3}{23224320}+\frac{873824279n^2}{8778792960}+\frac{5557231n}{13934592}+\frac{256697834389}{438939648000}\rfloor\)


注:\(\lceil x\rfloor\)取最接近\(x\)的整数 ,公式给出的数值与准确数据误差为1

点评

太好了!谢谢大师们!  发表于 2019-1-8 20:13
哦,那就是舍掉的部分项造成的,需要分析舍去项的渐进公式  发表于 2019-1-8 20:07
越往后误差越大  发表于 2019-1-8 19:47
我验算的是前1000项,:)  发表于 2019-1-8 19:47
我验算过前50项与准确值差1  发表于 2019-1-8 19:42
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2019-1-9 09:02:31 | 显示全部楼层
pari/gp数值计算
  1. get_cof(k)=
  2. {
  3.    local(v,m,d,w,ind,pow);
  4.    d=k*(k+1)/2;
  5.    v=vector(d);
  6.    m=matrix(d,d);
  7.    for(s=1,k,
  8.         for(t=-d+1,0,
  9.             m[s,d+t]=t^(s-1)
  10.         )
  11.    );
  12.    ind=k+1;
  13.    for(h=2,k,
  14.        pow=floor(k/h)-1;
  15.        w = cos(2*Pi/h)+I*sin(2*Pi/h);
  16.        for(s=1,h-1,
  17.              if(gcd(s,h)==1,
  18.                for(r=0,pow,
  19.                 for(t=-d+1,0,
  20.                   m[ind,d+t]=if(r==0,1,t^r)*w^(s*t)
  21.                 );
  22.                 ind=ind+1;
  23.                )
  24.             )
  25.        )
  26.    );
  27.    v[d]=1;
  28.    v*m^(-1)
  29. }
复制代码

上面代码计算出通项公式系数,系数排列如下
首先是k个系数代表$a_0+a_1*n+...+a_{k-1}*n^{k-1}$
然后$\floor(k/2)-1$个系数代表形如$(b_0+b_1*n+...+b_r*n^r)(-1)^n$的系数
然后$2*(\floor(k/3)-1)$个系数分别代表形如$(b_0+b_1*n+...+b_r*n^r)w_3^n$和$(b_0+b_1*n+...+b_r*n^r)w_3^{2n}$的系数
再然后$2*(\floor(k/4)-1)$个系数分别代表形如$(b_0+b_1*n+...+b_r*n^r)w_4^n$和$(b_0+b_1*n+...+b_r*n^r)w_4^{3n}$的系数
...
计算得出
get_cof(2)
[0.7500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + 0.E-115*I,  /*1*/
0.5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + 0.E-115*I,  /*n*/
0.2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + 0.E-115*I]  /*(-1)^n*/

get_cof(3)
[0.6527777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777778 - 3.785126796914726460 E-116*I,  /*1*/
0.5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - 6.419759126682119650 E-116*I,  /*n*/
0.08333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 - 1.3115636925479599283 E-116*I, /*n^2*/
0.1250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - 1.7602565347354199038 E-116*I,  /*(-1)^n*/
0.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 + 1.2195241351761732669 E-116*I, /*w_3^n*/
0.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 + 4.259138503307523252 E-116*I] /*w_3^(2n)*/

get_cof(4)
[0.6076388888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888889 - 4.366065306309919797 E-116*I, /*1*/
0.4687500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - 4.919396538232142883 E-116*I,  /*n*/
0.1041666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667 - 1.4095087135410081677 E-116*I, /*n^2*/
0.006944444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444 - 1.0792578998247964282 E-117*I,/*n^3*/
0.1562500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - 6.829530985832042181 E-117*I, /*(-1)^n*/
0.03125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - 3.211669561381701287 E-117*I, /*n*(-1)^n*/
0.05555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555556 - 0.03207501495497920913939715447233096975820009729278482644547790702688764846127407476076196642143052918*I, /*w_3^n*/
0.05555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555556 + 0.03207501495497920913939715447233096975820009729278482644547790702688764846127407476076196642143052918*I, /*w_3^(2n)*/
0.06250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - 9.310035523382053261 E-117*I, /*w_4^n*/
0.06250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - 5.454655128154287514 E-117*I] /*w_4^(3n)*/

get_cof(5)
[0.5862384259259259259259259259259259259259259259259259259259259259259259259259259259259259259259259259 - 2.672213889399288588 E-116*I, /*1*/
0.4427083333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 - 3.717601461598195812 E-116*I, /*n*/
0.1076388888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888889 - 9.599079904669862636 E-117*I, /*n^2*/
0.01041666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667 - 9.879153834991350566 E-118*I, /*n^3*/
0.0003472222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 - 4.553208310595013103 E-119*I, /*n^4*/
0.1171875000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - 1.9961367393579446702 E-116*I, /*(-1)^n*/
0.01562500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - 3.1235328117036551143 E-117*I, /*n*(-1)^n*/
0.03703703703703703703703703703703703703703703703703703703703703703703703703703703703703703703703703704 + 3.225309176590617821 E-116*I, /*w_3^n*/
0.03703703703703703703703703703703703703703703703703703703703703703703703703703703703703703703703703704 + 5.503562687908569388 E-116*I, /*w_3^(2n)*/
0.03125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - 0.03125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000*I,  /*w_4^n*/
0.03125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + 0.03125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000*I, /*w_4^(3n)*/
0.04000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - 1.9956333091537126021 E-116*I, /*w_5^n*/
0.04000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - 2.0421282787724463076 E-116*I,  /*w_5^(2n)*/
0.04000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + 1.8963026292677155345 E-117*I, /*w_5^(3n)*/
0.04000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - 9.262490079228373771 E-117*I]/*w_5^(4n)*/

get_cof(6)
[0.5774797453703703703703703703703703703703703703703703703703703703703703703703703703703703703703703704 - 3.796102707498839356 E-116*I, /*1*/
0.4241994598765432098765432098765432098765432098765432098765432098765432098765432098765432098765432099 - 3.610592324864404662 E-116*I, /*n*/
0.1063368055555555555555555555555555555555555555555555555555555555555555555555555555555555555555555556 - 1.1477440001218293977 E-116*I, /*n^2*/
0.01188271604938271604938271604938271604938271604938271604938271604938271604938271604938271604938271605 - 8.410455083228083817 E-118*I, /*n^3*/
0.0006076388888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888889 - 7.821882161566841241 E-119*I, /*n^4*/
1.157407407407407407407407407407407407407407407407407407407407407407407407407407407407407407407407407 E-5 - 1.3067770699738616393 E-120*I, /*n^5*/
0.1260850694444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444 - 1.8045635730581532741 E-116*I, /*(-1)^n*/
0.02734375000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - 6.256322887045538980 E-117*I, /*n*(-1)^n*/
0.001302083333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 - 3.895608099146200599 E-118*I, /*n^2*(-1)^n*/
0.06481481481481481481481481481481481481481481481481481481481481481481481481481481481481481481481481481 - 0.003563890550553245459933017163592329973133344143642758493941989669654183162363786084529107380158947687*I, /*w_3^n*/
0.006172839506172839506172839506172839506172839506172839506172839506172839506172839506172839506172839506 + 3.773502694640571558 E-117*I, /*n*w_3^n*/
0.06481481481481481481481481481481481481481481481481481481481481481481481481481481481481481481481481481 + 0.003563890550553245459933017163592329973133344143642758493941989669654183162363786084529107380158947687*I,  /*w_3^(2n)*/
0.006172839506172839506172839506172839506172839506172839506172839506172839506172839506172839506172839506 + 9.613042562208571861 E-117*I, /*n*w_3^(2n)*/
0.01562500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - 0.01562500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000*I, /*w_4^n*/
0.01562500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + 0.01562500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000*I, /*w_4^(3n)*/
0.02000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - 0.02752763840942347076414419163821775359051798672016317326731351531238190387534345970131905986220140385*I, /*w_5^n*/
0.02000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - 0.006498393924658126523117428244302689299098069430429502006156094382733458019214898966453754708939301010*I, /*w_5^(2n)*/
0.02000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + 0.006498393924658126523117428244302689299098069430429502006156094382733458019214898966453754708939301010*I, /*w_5^(3n)*/
0.02000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + 0.02752763840942347076414419163821775359051798672016317326731351531238190387534345970131905986220140385*I, /*w_5^(4n)*/
0.02777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777778 - 7.551030356988880236 E-117*I, /*w_6^n*/
0.02777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777778 + 2.954722291932547462 E-116*I]/*w_6^(5n)*/
其中红色项才是误差来源,系数为$1/162$,所以在n至少在81左右才会看到偏差的出现
所以星空的$f_6$可以纠正为
\(f_6(n)=\lceil\frac{n^5}{86400}+\frac{7n^4}{11520}+\frac{77n^3}{6480}+(\frac{(-1)^n}{768}+\frac{245}{2304})n^2+(\frac{7(-1)^n}{256}+\frac{43981}{103680})n+\frac{581(-1)^n}{4608}+\frac{199577}{345600}+\frac n{162}((-\frac12+i\frac{\sqrt{3}}2)^n+(-\frac12-i\frac{\sqrt{3}}2)^n)\rfloor\)
或者写成
\(f_6(n)=\lceil\frac{n^5}{86400}+\frac{7n^4}{11520}+\frac{77n^3}{6480}+(\frac{(-1)^n}{768}+\frac{245}{2304})n^2+(\frac{7(-1)^n}{256}+\frac{43981}{103680})n+\frac{581(-1)^n}{4608}+\frac{199577}{345600}+\frac n{81}\cos(\frac{2n\pi}{3})\rfloor\)

点评

经验算3000项,完全正确  发表于 2019-1-9 14:27
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2019-1-9 11:49:17 | 显示全部楼层
get_cof(7)=
[0.57606535939993281263122532963802805076 , /*1*/
0.41170910493827160493827160493827160496 , /*n*/
0.10393229166666666666666666666666666667 ,  /*n^2*/
0.012422839506172839506172839506172839507 ,/*n^3*/
0.00076195987654320987654320987654320987657 ,/*n^4*/
2.3148148148148148148148148148148148149 E-5 , /*n^5*/
2.7557319223985890652557319223985890654 E-7, /*n^6*/
0.11089409722222222222222222222222222221 ,  /*(-1)^n*/
0.018229166666666666666666666666666666664 , /*n*(-1)^n*/
0.00065104166666666666666666666666666666659 , /*n^2*(-1)^n*/
0.045781893004115226337448559670781892998 - 0.020492370665681161394614848690655897345*I,  /*w_3^n*/
0.0030864197530864197530864197530864197528 - 0.0017819452752766227299665085817961649867*I,  /*n*w_3^n*/
0.045781893004115226337448559670781892998 + 0.020492370665681161394614848690655897351*I,   /*w_3^(2n)*/
0.0030864197530864197530864197530864197526 + 0.0017819452752766227299665085817961649873*I,  /*n*w_3^(2n)*/
0.015624999999999999999999999999999999999 , /*w_4^n*/
0.015625000000000000000000000000000000000 , /*w_4^(3n)*/
0.0055278640450004206071816526625374475308 - 0.017013016167040798643630809941260221448*I, /*w_5^n*/
0.014472135954999579392818347337462552473 + 0.010514622242382672120513381696957532150*I,  /*w_5^(2n)*/
0.014472135954999579392818347337462552473 - 0.010514622242382672120513381696957532153*I,   /*w_5^(3n)*/
0.0055278640450004206071816526625374475294 + 0.017013016167040798643630809941260221451*I, /*w_5^(4n)*/
0.013888888888888888888888888888888888886 - 0.024056261216234406854547865854248227314*I, /*w_6^n*/
0.013888888888888888888888888888888888890 + 0.024056261216234406854547865854248227309*I, /*w_6^(5n)*/
0.020408163265306122448979591836734693876 ,  /*w_7^n*/
0.020408163265306122448979591836734693875 ,  /*w_7^(2n)*/
0.020408163265306122448979591836734693878 , /*w_7^(3n)*/
0.020408163265306122448979591836734693879 , /*w_7^(4n)*/
0.020408163265306122448979591836734693878 , /*w_7^(5n)*/
0.020408163265306122448979591836734693873 ]/*w_7^(6n)*/
需要打补丁 $\frac{\sqrt{3}n}{486}(\cos({pi}/6)+i\sin({pi}/6))((-1/2+{sqrt{3}}/2)^n+(-1/2-{sqrt{3}}/2)^n)$
get_cof(8)=
[0.57909596738000755857898715041572184445 , /*1*/
0.40364999563675778953556731334509112297 , /*n*/
0.10155598958333333333333333333333333335 ,  /*n^2*/
0.012550309330908289241622574955908289242 ,  /*n^3*/
0.00084635416666666666666666666666666666653 , /*n^4*/
3.1725363756613756613756613756613756605 E-5 ,  /*n^5*/
6.2003968253968253968253968253968253945 E-7 , /*n^6*/
4.9209498614260519022423784328546233284 E-9 ,  /*n^7*/
0.11279296875000000000000000000000000006 ,  /*(-1)^n*/
0.023844401041666666666666666666666666684 , /*n*(-1)^n*/
0.0014648437500000000000000000000000000012,/*n^2*(-1)^n*/
2.7126736111111111111111111111111111134 E-5 , /*n^3*(-1)^n*/
0.037037037037037037037037037037037037010 - 0.0017819452752766227299665085817961649651*I,  /*w_3^n*/
0.0020576131687242798353909465020576131670 ,  /*n*w_3^n*/
0.037037037037037037037037037037037037013 + 0.0017819452752766227299665085817961649811*I, /*w_3^(2n)*/
0.0020576131687242798353909465020576131666,  /*n*w_3^(2n)*/
0.035156249999999999999999999999999999975 - 0.0039062500000000000000000000000000000287*I,  /*w_4^n*/
0.0019531249999999999999999999999999999983 , /*n*w_4^n*/
0.035156249999999999999999999999999999970 + 0.0039062500000000000000000000000000000182*I,/*w_4^(2n)*/
0.0019531249999999999999999999999999999980 , /*n*w_4^(2n)*/
0.0055278640450004206071816526625374475227 - 0.0076084521303612285769315146670350571516*I, /*w_5^n*/
0.014472135954999579392818347337462552446 - 0.0047022820183397850333496476371125821396*I,   /*w_5^(2n)*/
0.014472135954999579392818347337462552449 + 0.0047022820183397850333496476371125821323*I, /*w_5^(3n)*/
0.0055278640450004206071816526625374475327 + 0.0076084521303612285769315146670350571590*I,/*w_5^(4n)*/
-2.8009390922617388924 E-39 - 0.016037507477489604569698577236165484890*I, /*w_6^n*/
1.0400165605073629948 E-38 + 0.016037507477489604569698577236165484871*I, /*w_6^(2n)*/
0.010204081632653061224489795918367346907 - 0.021188993842574862930240192464141227880*I,  /*w_7^n*/
0.010204081632653061224489795918367346926 - 0.0081374835600245302185274311654534171278*I, /*w_7^(2n)*/
0.010204081632653061224489795918367346936 - 0.0023290150447974483477307281842960691868*I,/*w_7^(3n)*/
0.010204081632653061224489795918367346932 + 0.0023290150447974483477307281842960692006*I,/*w_7^(4n)*/
0.010204081632653061224489795918367346939 + 0.0081374835600245302185274311654534171243*I, /*w_7^(5n)*/
0.010204081632653061224489795918367346912 + 0.021188993842574862930240192464141227871*I,/*w_7^(6n)*/
0.015625000000000000000000000000000000017 - 2.2581336286288657255 E-38*I, /*w_8^n*/
0.015625000000000000000000000000000000005 - 1.2572598927951044644 E-38*I, /*w_8^(3n)*/
0.015624999999999999999999999999999999997 + 1.5025567602724335307 E-38*I,/*w_8^(5n)*/
0.015624999999999999999999999999999999999 + 1.4284179650254882521 E-38*I]/*w_8^(7n)*/
需要打补丁 $\frac{n}{486}((-1/2+{sqrt{3}}/2)^n+(-1/2-{sqrt{3}}/2)^n)+\frac{n}{512}(i^n+(-i)^n)$
get_cof(9)=
[0.58481350581709128267219096143258400825 ,  /*1*/
0.39880830382403733098177542621987066491 ,  /*n*/
0.099538089459624298965127889290146785889 ,  /*n^2*/
0.012500215291556437389770723104056437407 , /*n^3*/
0.00088972058409269057417205565353713501971 , /*n^4*/
3.7460730820105820105820105820105820148 E-5 , /*n^5*/
9.2336156427591612776797961983147168409 E-7 ,/*n^6*/
1.2302374653565129755605946082136558335 E-8 , /*n^7*/
6.8346525853139609753366367122980879632 E-11, /*n^8*/
0.10757446289062499999999999999999999980 , /*(-1)^n*/
0.018513997395833333333333333333333333298 ,/*n*(-1)^n*/
0.00091552734374999999999999999999999999874 ,/*n^2*(-1)^n*/
1.3563368055555555555555555555555555544 E-5 ,/*n^3*(-1)^n*/
0.050525834476451760402377686328303612154 - 0.0044548631881915568249162714544904125399*I, /*w_3^n*/
0.0051440329218106995884773662551440329110 - 0.00019799391947518030332961206464401833472*I, /*n*w_3^n*/
0.00011431184270690443529949702789208962029 , /*n^2*w_3^n*/

0.050525834476451760402377686328303612168 + 0.0044548631881915568249162714544904125310*I, /*w_3^(2n)*/
0.0051440329218106995884773662551440329096 + 0.00019799391947518030332961206464401833895*I, /*n*w_3^(2n)*/
0.00011431184270690443529949702789208962024 , /*n^2*w_3^(2n)*/

0.024414062499999999999999999999999999980 - 0.019531250000000000000000000000000000069*I,/*w_4^n*/
0.00097656249999999999999999999999999999884 - 0.00097656250000000000000000000000000000177*I, /*n*w_4^n*/
0.024414062499999999999999999999999999965 + 0.019531250000000000000000000000000000010*I, /*w_4^(2n)*/
0.00097656249999999999999999999999999999790 + 0.00097656249999999999999999999999999999982*I, /*n*w_4^(2n)*/
0.0079999999999999999999999999999999999892 , /*w_5^n*/
0.0079999999999999999999999999999999999863 ,/*w_5^(2n)*/
0.0079999999999999999999999999999999999953 ,/*w_5^(3n)*/
0.0079999999999999999999999999999999999678 , /*w_5^(4n)*/
- 0.0080187537387448022848492886180827424671*I, /*w_6^n*/
+ 0.0080187537387448022848492886180827424611*I,/*w_6^(5n)*/
-0.0033467885469967527326125716837198969981 - 0.014663238701299696574383811814797322522*I, /*w_7^n*/
0.0060307045765928931169178134489732633478 - 0.0029042342576135409353983514905786739954*I,/*w_7^(2n)*/
0.0075201656030569208401845541531139806440 + 0.0094299893988887072912547321399225793012*I,/*w_7^(3n)*/
0.0075201656030569208401845541531139806576 - 0.0094299893988887072912547321399225792912*I, /*w_7^(4n)*/
0.0060307045765928931169178134489732633570 + 0.0029042342576135409353983514905786739755*I,/*w_7^(5n)*/
-0.0033467885469967527326125716837198970199 + 0.014663238701299696574383811814797322482*I,/*w_7^(6n)*/
0.0078124999999999999999999999999999999640 - 0.018861043456039805068763193157888266260*I,/*w_8^n*/
0.0078124999999999999999999999999999999375 - 0.0032360434560398050687631931578882662673*I, /*w_8^(3n)*/
0.0078124999999999999999999999999999999456 + 0.0032360434560398050687631931578882662554*I, /*w_8^(5n)*/
0.0078124999999999999999999999999999999706 + 0.018861043456039805068763193157888266208*I, /*w_8^(7n)*/
0.012345679012345679012345679012345679030 , /*w_9^n*/
0.012345679012345679012345679012345679009 ,/*w_9^(2n)*/
0.012345679012345679012345679012345678981, /*w_9^(4n)*/
0.012345679012345679012345679012345678973 ,/*w_9^(5n)*/
0.012345679012345679012345679012345678991 , /*w_9^(7n)*/
0.012345679012345679012345679012345678967 ]/*w_9^(8n)*/
需要打补丁   $({5n}/972+\frac{n^2}{8748}-i{\sqrt(3)n}/8748)(-1/2+i{sqrt(3)}/2)^n+({5n}/972+\frac{n^2}{8748}+i{\sqrt(3)n}/8748)(-1/2-i{sqrt(3)}/2)^n + n/1024((1-i)i^n+(1+i)(-i)^n)$

点评

计算复数的绝对值平方在用连分数表示通常就能解决了  发表于 2019-1-9 21:04
很好奇,你是如何利用数值计算得到代数表达式的?  发表于 2019-1-9 20:16

评分

参与人数 1威望 +9 金币 +8 贡献 +6 经验 +12 鲜花 +12 收起 理由
数学星空 + 9 + 8 + 6 + 12 + 12 神马都是浮云!

查看全部评分

毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2019-1-9 15:03:13 | 显示全部楼层
线性常系数差分方程的求解直接用Mathematica的RSolve在高阶的情况下搞不定。

于是尝试了下Z变换及其逆变换来做。计算如下:


===============================================
\[\frac{z^3}{(z-1)^2 (z+1)}, \]
\[ f_2(n) = \frac{1}{4} \left(2 n+(-1)^n+3\right)\]
===============================================
\[\frac{z^6}{(z-1)^3 \left(z^3+2 z^2+2 z+1\right)},  \]
\[f_3(n) = \frac{1}{72} \left(6 n (n+6)+9 e^{i \pi  n}+16 \cos \left(\frac{2 \pi  n}{3}\right)+47\right)\]
\(f_3(n) = \text{Round}\left[\frac{n^2}{12}+\frac{n}{2}+\frac{(-1)^n}{8}+\frac{47}{72}\right]\)
===============================================
\[\frac{z^{10}}{(z-1)^4 (z+1)^2 \left(z^4+z^3+2 z^2+z+1\right)}, \]
\[ f_4(n) = \frac{1}{288} \left(\frac{16 e^{\frac{1}{3} (-2) i \pi  n} \left(2 e^{\frac{4 i \pi  n}{3}}+i \sqrt{3}+1\right)}{1+\sqrt[3]{-1}}+(n+5) \left(2 n (n+10)+9 (-1)^n+35\right)+36 \cos \left(\frac{\pi  n}{2}\right)\right)\]
\(f_4(n) = \text{Round}\left[\frac{n^3}{144}+\frac{5 n^2}{48}+\frac{1}{32} (-1)^n n+\frac{15 n}{32}+\frac{5 (-1)^n}{32}+\frac{175}{288}\right] \)
===============================================
\[\frac{z^{15}}{(z-1)^5 (z+1)^2 \left(z^8+2 z^7+4 z^6+5 z^5+6 z^4+5 z^3+4 z^2+2 z+1\right)},\]
\[ f_5(n) =\frac{30 n (n+15) (n (n+15)+85)+5400 \sin \left(\frac{\pi  n}{2}\right)+675 i (2 n+15) \sin (\pi  n)+5400 \cos \left(\frac{\pi  n}{2}\right)+6400 \cos \left(\frac{2 \pi  n}{3}\right)+6912 \cos \left(\frac{2 \pi  n}{5}\right)+6912 \cos \left(\frac{4 \pi  n}{5}\right)+675 (2 n+15) \cos (\pi  n)+50651}{86400}\]
\(f_5(n)=\text{Round}\left[\frac{n^4}{2880}+\frac{n^3}{96}+\frac{31 n^2}{288}+\frac{1}{64} (-1)^n n+\frac{85 n}{192}+\frac{15 (-1)^n}{128}+\frac{50651}{86400}\right]\)
===============================================
\[\frac{z^{21}}{(z-1)^6 (z+1)^3 \left(z^2+z+1\right)^2 \left(z^8+2 z^6+z^5+2 z^4+z^3+2 z^2+1\right)}, \]
\(f_6(n)= \text{Round}\left[\frac{n^5}{86400}+\frac{7 n^4}{11520}+\frac{77 n^3}{6480}+\frac{1}{768} (-1)^n n^2+\frac{245 n^2}{2304}+\frac{1}{256} 7 (-1)^n n+\frac{43981 n}{103680}+\frac{5 (-1)^n}{192}+\frac{1}{81} n \cos \left(\frac{2 \pi  n}{3}\right)+\frac{199577}{345600}\right]\)

===============================================
\[\frac{z^{28}}{(z-1)^7 (z+1)^3 \left(z^2+z+1\right)^2 \left(z^{14}+z^{13}+3 z^{12}+4 z^{11}+6 z^{10}+7 z^9+9 z^8+8 z^7+9 z^6+7 z^5+6 z^4+4 z^3+3 z^2+z+1\right)},\]
\( f_7(n)=\text{Round}\left[\frac{n^6}{3628800}+\frac{n^5}{43200}+\frac{79 n^4}{103680}+\frac{161 n^3}{12960}+\frac{(-1)^n n^2}{1536}+\frac{3991 n^2}{38400}+\frac{1}{384} 7 (-1)^n n+\frac{21343 n}{51840}+\frac{511 (-1)^n}{4608}+\frac{(n+1) \sin \left(\frac{2 \pi  n}{3}\right)}{162 \sqrt{3}}+\frac{1}{32} \cos \left(\frac{\pi  n}{2}\right)+\frac{1}{162} (n+1) \cos \left(\frac{2 \pi  n}{3}\right)+\frac{87797891}{152409600}\right]\)
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2019-1-9 15:34:17 | 显示全部楼层
\[\frac{z^{36}}{(z-1)^8 (z+1)^4 \left(z^4+z^3+2 z^2+z+1\right)^2 \left(z^{16}+z^{15}+2 z^{14}+3 z^{13}+5 z^{12}+5 z^{11}+7 z^{10}+7 z^9+8 z^8+7 z^7+7 z^6+5 z^5+5 z^4+3 z^3+2 z^2+z+1\right)}\]
\(f_8(n) = \text{Round}\left[\frac{n^7}{203212800}+\frac{n^6}{1612800}+\frac{307 n^5}{9676800}+\frac{13 n^4}{15360}+\frac{(-1)^n n^3}{36864}+\frac{728681 n^3}{58060800}+\frac{3 (-1)^n n^2}{2048}+\frac{15599 n^2}{153600}+\frac{293 (-1)^n n}{12288}+\frac{2812349 n}{6967296}+\frac{231 (-1)^n}{2048}+\frac{1}{256} n \cos \left(\frac{\pi  n}{2}\right)+\frac{1}{243} n \cos \left(\frac{2 \pi  n}{3}\right)+\frac{39226571}{67737600}\right]\)


\[\frac{z^{45}}{(z-1)^9 (z+1)^4 \left(z^2+1\right)^2 \left(z^2+z+1\right)^3 \left(z^{22}+z^{21}+2 z^{20}+4 z^{19}+6 z^{18}+7 z^{17}+11 z^{16}+13 z^{15}+15 z^{14}+17 z^{13}+19 z^{12}+18 z^{11}+19 z^{10}+17 z^9+15 z^8+13 z^7+11 z^6+7 z^5+6 z^4+4 z^3+2 z^2+z+1\right)}\]
\(f_9(n)=\text{Round}\left[\frac{n^8}{14631321600}+\frac{n^7}{81285120}+\frac{193 n^6}{209018880}+\frac{29 n^5}{774144}+\frac{464921 n^4}{522547200}+\frac{(-1)^n n^3}{73728}+\frac{290309 n^3}{23224320}+\frac{15 (-1)^n n^2}{16384}+\frac{873824279 n^2}{8778792960}+\frac{455 (-1)^n n}{24576}+\frac{5557231 n}{13934592}+\frac{3525 (-1)^n}{32768}+\frac{2 n \sin \left(\frac{2 \pi  n}{3}\right)}{2916 \sqrt{3}}+\frac{1}{512} n \sin \left(\frac{\pi  n}{2}\right)+\frac{(n+45) n \cos \left(\frac{2 \pi  n}{3}\right)}{4374}+\frac{1}{512} n \cos \left(\frac{\pi  n}{2}\right)+\frac{256697834389}{438939648000}\right]\)


毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2019-1-9 17:07:59 | 显示全部楼层
$k=10$的时候好像很费劲呢,一点都不好玩。

\[\frac{z^{55}}{(z-1)^{10} (z+1)^5 \left(z^2+z+1\right)^3 \left(z^6+z^5+2 z^4+2 z^3+2 z^2+z+1\right)^2 \left(z^{22}-z^{21}+2 z^{20}+2 z^{18}+z^{17}+3 z^{16}+z^{15}+5 z^{14}+z^{13}+5 z^{12}+2 z^{11}+5 z^{10}+z^9+5 z^8+z^7+3 z^6+z^5+2 z^4+2 z^2-z+1\right)}\]
\(f_{10}(n)= \text{Round}\left[\frac{n^9}{1316818944000}+\frac{11 n^8}{58525286400}+\frac{869 n^7}{43893964800}+\frac{121 n^6}{104509440}+\frac{3222263 n^5}{78382080000}+\frac{(-1)^n n^4}{2949120}+\frac{7607149 n^4}{8360755200}+\frac{11 (-1)^n n^3}{294912}+\frac{362312621 n^3}{29262643200}+\frac{209 (-1)^n n^2}{147456}+\frac{859801921 n^2}{8778792960}+\frac{-e^{\frac{2 i \pi  n}{3}} n^2-2 e^{\frac{1}{3} (-2) i \pi  n} n^2+i \sqrt{3} e^{\frac{2 i \pi  n}{3}} n^2-e^{\frac{2 i \pi  n}{3}} n-2 i \sqrt{3} e^{\frac{1}{3} (-2) i \pi  n} n-8 e^{\frac{1}{3} (-2) i \pi  n} n+5 i \sqrt{3} e^{\frac{2 i \pi  n}{3}} n}{1944 \left(1+\sqrt[3]{-1}\right)^5}+\frac{\left(\left(-\sqrt[5]{-1}\right)^n+(-1)^{\frac{2 n}{5}}+(-1)^{\frac{4 n}{5}}+\left(-(-1)^{3/5}\right)^n\right) n}{1250}+\frac{4235 (-1)^n n}{196608}+\frac{745508886881 n}{1881169920000}+\frac{9406331 (-1)^n}{88473600}+\frac{n \left(41 \sqrt{3} \sin \left(\frac{2 \pi  n}{3}\right)+163 \cos \left(\frac{2 \pi  n}{3}\right)\right)}{26244}+\frac{n \sin \left(\frac{\pi  n}{2}\right)+n \cos \left(\frac{\pi  n}{2}\right)}{1024}+\frac{1039519669529}{1755758592000}\right]\)

点评

我得到新的表达了。这个应该跟软件没关系。是本征的。  发表于 7 天前
方法很直接,一步到位,就是软件对化简的功能还需要优化,尤其是三角函数化简  发表于 2019-1-9 20:14

评分

参与人数 1威望 +12 金币 +8 贡献 +12 经验 +12 鲜花 +12 收起 理由
数学星空 + 12 + 8 + 12 + 12 + 12

查看全部评分

毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
您需要登录后才可以回帖 登录 | 欢迎注册

本版积分规则

小黑屋|手机版|数学研发网 ( 苏ICP备07505100号 )

GMT+8, 2019-1-17 22:38 , Processed in 0.054485 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表