2023年11月12日日曜日

231112

PARI


A(x) = 1 + x*A(x)^t / (1 - x*A(x)^u)^s.

A(x) = 1 + x*A(x)^t / (1 - x*A(x)^u)^s
を満たすA(x)を展開してみた。
また、
A(x) = 1 + x*A(x)^t * (1 + x*A(x)^u)^s
を満たすA(x)も展開してみた。

K=5;
L=3;
M=30;
N=10;

a(n, s, t, u) = sum(k=0, n, binomial(t*k+u*(n-k)+1, k)*binomial(n+(s-1)*k-1, n-k)/(t*k+u*(n-k)+1));
b(n, s, t, u) = my(A=1); for(i=1, n, A = 1 + x*A^t / (1 - x*A^u)^s + x*O(x^n) ); polcoeff(A, n);

\\ aとbの値が一致するかどうかを確認
for(s=0, K, for(t=0, K, for(u=0, K, for(n=0, M, if(a(n, s, t, u)!=b(n, s, t, u), print([n, s, t, u]))))))
for(s=0, L, for(t=0, L, for(u=0, L, print1([s, t, u],": "); for(n=0, N, print1(a(n, s, t, u),", ")); print)))

print

a(n, s, t, u) = sum(k=0, n, binomial(t*k+u*(n-k)+1, k)*binomial(s*k, n-k)/(t*k+u*(n-k)+1));
b(n, s, t, u) = my(A=1); for(i=1, n, A = 1 + x*A^t * (1 + x*A^u)^s + x*O(x^n) ); polcoeff(A, n);

\\ aとbの値が一致するかどうかを確認
for(s=0, K, for(t=0, K, for(u=0, K, for(n=0, M, if(a(n, s, t, u)!=b(n, s, t, u), print([n, s, t, u]))))))
for(s=0, L, for(t=0, L, for(u=0, L, print1([s, t, u],": "); for(n=0, N, print1(a(n, s, t, u),", ")); print)))

出力結果
[0, 0, 0]: 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
[0, 0, 1]: 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
[0, 0, 2]: 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
[0, 0, 3]: 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
[0, 1, 0]: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
[0, 1, 1]: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
[0, 1, 2]: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
[0, 1, 3]: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
[0, 2, 0]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[0, 2, 1]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[0, 2, 2]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[0, 2, 3]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[0, 3, 0]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[0, 3, 1]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[0, 3, 2]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[0, 3, 3]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[1, 0, 0]: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
[1, 0, 1]: 1, 1, 1, 2, 4, 9, 21, 51, 127, 323, 835, 
[1, 0, 2]: 1, 1, 1, 3, 8, 25, 81, 274, 953, 3389, 12265, 
[1, 0, 3]: 1, 1, 1, 4, 13, 50, 201, 841, 3627, 15993, 71803, 
[1, 1, 0]: 1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 
[1, 1, 1]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[1, 1, 2]: 1, 1, 2, 6, 21, 80, 322, 1347, 5798, 25512, 114236, 
[1, 1, 3]: 1, 1, 2, 7, 29, 131, 627, 3124, 16032, 84162, 449828, 
[1, 2, 0]: 1, 1, 3, 10, 36, 137, 543, 2219, 9285, 39587, 171369, 
[1, 2, 1]: 1, 1, 3, 11, 45, 197, 903, 4279, 20793, 103049, 518859, 
[1, 2, 2]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[1, 2, 3]: 1, 1, 3, 13, 66, 366, 2148, 13115, 82449, 530095, 3469401, 
[1, 3, 0]: 1, 1, 4, 19, 101, 578, 3479, 21714, 139269, 912354, 6078832, 
[1, 3, 1]: 1, 1, 4, 20, 113, 688, 4404, 29219, 199140, 1385904, 9807820, 
[1, 3, 2]: 1, 1, 4, 21, 126, 818, 5594, 39693, 289510, 2157150, 16348960, 
[1, 3, 3]: 1, 1, 4, 22, 140, 969, 7084, 53820, 420732, 3362260, 27343888, 
[2, 0, 0]: 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 
[2, 0, 1]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[2, 0, 2]: 1, 1, 2, 7, 26, 107, 462, 2074, 9572, 45147, 216638, 
[2, 0, 3]: 1, 1, 2, 9, 40, 202, 1068, 5884, 33356, 193365, 1140940, 
[2, 1, 0]: 1, 1, 3, 8, 21, 55, 144, 377, 987, 2584, 6765, 
[2, 1, 1]: 1, 1, 3, 10, 37, 146, 602, 2563, 11181, 49720, 224540, 
[2, 1, 2]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[2, 1, 3]: 1, 1, 3, 14, 75, 438, 2704, 17356, 114661, 774514, 5324812, 
[2, 2, 0]: 1, 1, 4, 16, 68, 304, 1412, 6752, 33028, 164512, 831620, 
[2, 2, 1]: 1, 1, 4, 18, 90, 481, 2690, 15547, 92124, 556664, 3417062, 
[2, 2, 2]: 1, 1, 4, 20, 114, 702, 4550, 30585, 211270, 1490561, 10695354, 
[2, 2, 3]: 1, 1, 4, 22, 140, 969, 7084, 53820, 420732, 3362260, 27343888, 
[2, 3, 0]: 1, 1, 5, 27, 161, 1030, 6921, 48190, 344669, 2517303, 18695908, 
[2, 3, 1]: 1, 1, 5, 29, 189, 1325, 9757, 74429, 583037, 4662653, 37911037, 
[2, 3, 2]: 1, 1, 5, 31, 219, 1672, 13439, 112043, 960017, 8402085, 74791408, 
[2, 3, 3]: 1, 1, 5, 33, 251, 2073, 18069, 163600, 1523731, 14504988, 140499307, 
[3, 0, 0]: 1, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 
[3, 0, 1]: 1, 1, 3, 9, 31, 114, 438, 1739, 7077, 29364, 123756, 
[3, 0, 2]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[3, 0, 3]: 1, 1, 3, 15, 82, 495, 3147, 20812, 141621, 985287, 6976369, 
[3, 1, 0]: 1, 1, 4, 13, 41, 129, 406, 1278, 4023, 12664, 39865, 
[3, 1, 1]: 1, 1, 4, 16, 71, 336, 1660, 8464, 44207, 235306, 1271807, 
[3, 1, 2]: 1, 1, 4, 19, 104, 615, 3829, 24728, 164122, 1112641, 7671781, 
[3, 1, 3]: 1, 1, 4, 22, 140, 969, 7084, 53820, 420732, 3362260, 27343888, 
[3, 2, 0]: 1, 1, 5, 23, 111, 562, 2952, 15948, 88076, 495077, 2823293, 
[3, 2, 1]: 1, 1, 5, 26, 150, 925, 5967, 39772, 271758, 1893431, 13400897, 
[3, 2, 2]: 1, 1, 5, 29, 192, 1372, 10314, 80390, 643774, 5264984, 43788393, 
[3, 2, 3]: 1, 1, 5, 32, 237, 1906, 16179, 142665, 1294115, 11998349, 113194205, 
[3, 3, 0]: 1, 1, 6, 36, 236, 1656, 12192, 92960, 727824, 5817696, 47281472, 
[3, 3, 1]: 1, 1, 6, 39, 284, 2223, 18267, 155445, 1358073, 12111306, 109802183, 
[3, 3, 2]: 1, 1, 6, 42, 335, 2886, 26166, 246028, 2377161, 23459250, 235452723, 
[3, 3, 3]: 1, 1, 6, 45, 389, 3648, 36090, 370793, 3918225, 42314583, 464953943, 

[0, 0, 0]: 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
[0, 0, 1]: 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
[0, 0, 2]: 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
[0, 0, 3]: 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
[0, 1, 0]: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
[0, 1, 1]: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
[0, 1, 2]: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
[0, 1, 3]: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
[0, 2, 0]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[0, 2, 1]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[0, 2, 2]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[0, 2, 3]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[0, 3, 0]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[0, 3, 1]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[0, 3, 2]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[0, 3, 3]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[1, 0, 0]: 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 
[1, 0, 1]: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
[1, 0, 2]: 1, 1, 1, 2, 3, 6, 11, 22, 44, 90, 187, 
[1, 0, 3]: 1, 1, 1, 3, 6, 16, 42, 114, 322, 918, 2673, 
[1, 1, 0]: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 
[1, 1, 1]: 1, 1, 2, 4, 9, 21, 51, 127, 323, 835, 2188, 
[1, 1, 2]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[1, 1, 3]: 1, 1, 2, 6, 20, 72, 273, 1073, 4333, 17869, 74937, 
[1, 2, 0]: 1, 1, 3, 9, 31, 113, 431, 1697, 6847, 28161, 117631, 
[1, 2, 1]: 1, 1, 3, 10, 38, 154, 654, 2871, 12925, 59345, 276835, 
[1, 2, 2]: 1, 1, 3, 11, 46, 207, 979, 4797, 24138, 123998, 647615, 
[1, 2, 3]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[1, 3, 0]: 1, 1, 4, 18, 94, 529, 3135, 19270, 121732, 785496, 5155167, 
[1, 3, 1]: 1, 1, 4, 19, 104, 614, 3816, 24595, 162896, 1101922, 7580904, 
[1, 3, 2]: 1, 1, 4, 20, 115, 715, 4683, 31824, 222300, 1586310, 11514030, 
[1, 3, 3]: 1, 1, 4, 21, 127, 833, 5763, 41401, 305877, 2309385, 17739561, 
[2, 0, 0]: 1, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 
[2, 0, 1]: 1, 1, 2, 3, 6, 11, 22, 44, 90, 187, 392, 
[2, 0, 2]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[2, 0, 3]: 1, 1, 2, 7, 24, 95, 386, 1641, 7150, 31844, 144216, 
[2, 1, 0]: 1, 1, 3, 6, 13, 28, 60, 129, 277, 595, 1278, 
[2, 1, 1]: 1, 1, 3, 8, 25, 81, 274, 953, 3389, 12265, 45025, 
[2, 1, 2]: 1, 1, 3, 10, 39, 162, 708, 3202, 14867, 70448, 339324, 
[2, 1, 3]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[2, 2, 0]: 1, 1, 4, 14, 56, 237, 1046, 4762, 22198, 105430, 508384, 
[2, 2, 1]: 1, 1, 4, 16, 74, 364, 1876, 9993, 54582, 304040, 1720576, 
[2, 2, 2]: 1, 1, 4, 18, 94, 527, 3108, 18993, 119214, 763997, 4978304, 
[2, 2, 3]: 1, 1, 4, 20, 116, 728, 4818, 33100, 233824, 1687764, 12393520, 
[2, 3, 0]: 1, 1, 5, 25, 145, 905, 5941, 40433, 282721, 2018897, 14661349, 
[2, 3, 1]: 1, 1, 5, 27, 169, 1138, 8061, 59188, 446455, 3438863, 26935372, 
[2, 3, 2]: 1, 1, 5, 29, 195, 1415, 10815, 85748, 698763, 5816595, 49246703, 
[2, 3, 3]: 1, 1, 5, 31, 223, 1738, 14289, 121985, 1070995, 9609132, 87716242, 
[3, 0, 0]: 1, 1, 3, 3, 1, 0, 0, 0, 0, 0, 0, 
[3, 0, 1]: 1, 1, 3, 6, 16, 42, 114, 322, 918, 2673, 7875, 
[3, 0, 2]: 1, 1, 3, 9, 34, 132, 546, 2327, 10191, 45534, 206788, 
[3, 0, 3]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[3, 1, 0]: 1, 1, 4, 10, 26, 69, 181, 476, 1252, 3292, 8657, 
[3, 1, 1]: 1, 1, 4, 13, 50, 201, 841, 3627, 15993, 71803, 327082, 
[3, 1, 2]: 1, 1, 4, 16, 77, 393, 2113, 11761, 67217, 392140, 2325691, 
[3, 1, 3]: 1, 1, 4, 19, 107, 648, 4144, 27500, 187654, 1308361, 9280049, 
[3, 2, 0]: 1, 1, 5, 20, 90, 430, 2136, 10937, 57307, 305822, 1656482, 
[3, 2, 1]: 1, 1, 5, 23, 123, 700, 4170, 25677, 162101, 1043603, 6825429, 
[3, 2, 2]: 1, 1, 5, 26, 159, 1042, 7185, 51340, 376806, 2823734, 21516113, 
[3, 2, 3]: 1, 1, 5, 29, 198, 1459, 11343, 91541, 759664, 6441671, 55570406, 
[3, 3, 0]: 1, 1, 6, 33, 209, 1425, 10206, 75751, 577494, 4495368, 35582439, 
[3, 3, 1]: 1, 1, 6, 36, 251, 1881, 14817, 120950, 1014042, 8680377, 75552553, 
[3, 3, 2]: 1, 1, 6, 39, 296, 2421, 20853, 186300, 1710522, 16041834, 153014400, 
[3, 3, 3]: 1, 1, 6, 42, 344, 3048, 28491, 276517, 2759943, 28150473, 292122423, 

0 件のコメント:

コメントを投稿

注: コメントを投稿できるのは、このブログのメンバーだけです。