2024年12月21日土曜日

241221

Ruby


2^n に現れる数字についての予想の紹介

この記事は
日曜数学 Advent Calendar 2024
の12/21 分として書いております。

0から9まで全ての数字が少なくとも1回は現れる数のうち最小のものは何?
という問題の答えは、
1023456789
とすぐわかります。

0から9まで全ての数字が少なくとも1回は現れる平方数のうち最小のものは何?
という問題の答えは、
例えば平方数を小さいものから調べて、
1026753849 (=32043^2)
とわかります。

0から9まで全ての数字が少なくとも1回は現れる立方数のうち最小のものは何?
という問題の答えは、
例えば立方数を小さいものから調べて、
12584301976 (=2326^3)
とわかります。

では、一般に
0から9まで全ての数字が少なくとも1回は現れるn乗数のうち最小のものは何?
という問題の答えはどうなるでしょうか?

各n に対し、条件を満たす数をa(n) とおき、
b(n) = a(n)^(1/n) とおきます。
b(n) が0 や1 でないことは明らかです。
n > 1 のときb(n) の具体的な値を出力してみます。

def all_digits?(n)
  n.to_s.split('').uniq.size == 10
end

def b(n)
  k = 2
  while !all_digits?(k ** n)
    k += 1
  end
  k
end

n = 200
(2..n).each{|i|
  print i
  print ' '
  puts b(i)
}

出力結果
2 32043
3 2326
4 763
5 309
6 159
7 56
8 104
9 49
10 36
11 25
12 15
13 25
14 17
15 17
16 15
17 16
18 7
19 5
20 6
21 6
22 5
23 11
24 9
25 14
26 5
27 5
28 5
29 5
30 9
31 5
32 8
33 11
34 4
35 4
36 6
37 5
38 7
39 3
40 5
41 4
42 4
43 6
44 4
45 3
46 6
47 3
48 3
49 4
50 4
51 5
52 4
53 3
54 6
55 4
56 4
57 3
58 4
59 4
60 3
61 3
62 3
63 3
64 3
65 3
66 4
67 3
68 2
69 3
70 2
71 3
72 3
73 3
74 3
75 4
76 3
77 3
78 3
79 2
80 3
81 4
82 2
83 3
84 2
85 3
86 3
87 2
88 2
89 2
90 3
91 4
92 3
93 3
94 2
95 2
96 2
97 2
98 2
99 3
100 2
101 2
102 3
103 2
104 2
105 2
106 2
107 3
108 3
109 2
110 2
111 2
112 2
113 2
114 2
115 2
116 2
117 2
118 2
119 2
120 2
121 2
122 2
123 2
124 2
125 2
126 2
127 2
128 2
129 2
130 2
131 2
132 2
133 2
134 2
135 2
136 2
137 2
138 2
139 2
140 2
141 2
142 2
143 2
144 2
145 2
146 2
147 2
148 2
149 2
150 2
151 2
152 2
153 3
154 2
155 2
156 2
157 2
158 2
159 2
160 2
161 2
162 2
163 2
164 2
165 2
166 2
167 2
168 3
169 2
170 2
171 2
172 2
173 2
174 2
175 2
176 2
177 2
178 2
179 2
180 2
181 2
182 2
183 2
184 2
185 2
186 2
187 2
188 2
189 2
190 2
191 2
192 2
193 2
194 2
195 2
196 2
197 2
198 2
199 2
200 2

n > 168 のとき、b(n) = 2 となることが予想されます。
言い換えれば、
n > 168 のとき、2^n について0から9まで全ての数字が少なくとも1回は現れる
という予想ができます。

実はOEISにおいて、
前者バージョンはA020666において予想されており、
また後者バージョンはA137214において予想されております。

一般に、ある数字や数字の並びが含まれるかどうかを問う問題は、難しいことが多いのでおそらく未解決のままであり続けるかもしれませんが、個人的に面白いと思ったので今回紹介しました。

余談ですが、この問題を調べているときに、
0から9まで全ての数字が少なくとも1回は現れる最小の2の冪乗は
295147905179352825856 (=2^68)
であり、意外に大きいと感じました。

2024年12月10日火曜日

241210

PARI


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

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

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

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

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

print

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

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

出力結果
[1, -3, 0, 0]: 1, 1, -3, 3, -1, 0, 0, 0, 0, 0, 0, 
[1, -3, 0, 1]: 1, 1, -3, 0, 14, -18, -54, 182, 78, -1287, 1365, 
[1, -3, 0, 2]: 1, 1, -3, -3, 26, 12, -294, 67, 3681, -3618, -48028, 
[1, -3, 0, 3]: 1, 1, -3, -6, 35, 87, -588, -1578, 11511, 32223, -245883, 
[1, -3, 1, 0]: 1, 1, -2, -2, 6, 5, -17, -12, 48, 28, -135, 
[1, -3, 1, 1]: 1, 1, -2, -5, 12, 41, -89, -391, 733, 4051, -6320, 
[1, -3, 1, 2]: 1, 1, -2, -8, 15, 113, -113, -1847, 101, 31852, 29719, 
[1, -3, 1, 3]: 1, 1, -2, -11, 15, 218, 28, -4818, -8640, 105841, 407601, 
[1, -3, 2, 0]: 1, 1, -1, -4, -2, 14, 36, 1, -191, -418, 182, 
[1, -3, 2, 1]: 1, 1, -1, -7, -5, 56, 174, -249, -2679, -3157, 27547, 
[1, -3, 2, 2]: 1, 1, -1, -10, -11, 122, 519, -796, -12562, -20842, 207119, 
[1, -3, 2, 3]: 1, 1, -1, -13, -20, 209, 1173, -1391, -37664, -96901, 786002, 
[1, -3, 3, 0]: 1, 1, 0, -3, -9, -15, 0, 107, 456, 1128, 1167, 
[1, -3, 3, 1]: 1, 1, 0, -6, -21, -15, 201, 1066, 1800, -8031, -65251, 
[1, -3, 3, 2]: 1, 1, 0, -9, -36, -3, 693, 3420, 1206, -75894, -423522, 
[1, -3, 3, 3]: 1, 1, 0, -12, -54, 18, 1563, 7997, -4749, -294567, -1558953, 
[1, -2, 0, 0]: 1, 1, -2, 1, 0, 0, 0, 0, 0, 0, 0, 
[1, -2, 0, 1]: 1, 1, -2, -1, 6, -1, -18, 16, 50, -93, -112, 
[1, -2, 0, 2]: 1, 1, -2, -3, 10, 18, -68, -131, 530, 1062, -4476, 
[1, -2, 0, 3]: 1, 1, -2, -5, 12, 55, -94, -711, 682, 9864, -2112, 
[1, -2, 1, 0]: 1, 1, -1, -2, 1, 4, 0, -7, -3, 11, 10, 
[1, -2, 1, 1]: 1, 1, -1, -4, 1, 21, 14, -111, -195, 529, 1837, 
[1, -2, 1, 2]: 1, 1, -1, -6, -1, 50, 88, -382, -1621, 1696, 22608, 
[1, -2, 1, 3]: 1, 1, -1, -8, -5, 89, 268, -760, -6237, -1997, 107527, 
[1, -2, 2, 0]: 1, 1, 0, -2, -4, -3, 6, 26, 46, 22, -128, 
[1, -2, 2, 1]: 1, 1, 0, -4, -10, 0, 76, 225, 22, -1980, -6448, 
[1, -2, 2, 2]: 1, 1, 0, -6, -18, 7, 248, 793, -658, -14467, -44992, 
[1, -2, 2, 3]: 1, 1, 0, -8, -28, 16, 558, 2048, -2568, -55636, -194048, 
[1, -2, 3, 0]: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
[1, -2, 3, 1]: 1, 1, 1, -1, -11, -42, -99, -64, 759, 4763, 16592, 
[1, -2, 3, 2]: 1, 1, 1, -3, -25, -89, -105, 884, 7011, 25315, 17963, 
[1, -2, 3, 3]: 1, 1, 1, -5, -41, -142, 9, 3349, 21459, 54912, -210482, 
[1, -1, 0, 0]: 1, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 
[1, -1, 0, 1]: 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 
[1, -1, 0, 2]: 1, 1, -1, -2, 1, 6, 1, -18, -16, 50, 93, 
[1, -1, 0, 3]: 1, 1, -1, -3, 0, 14, 18, -54, -182, 78, 1287, 
[1, -1, 1, 0]: 1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 
[1, -1, 1, 1]: 1, 1, 0, -2, -3, 1, 11, 15, -13, -77, -86, 
[1, -1, 1, 2]: 1, 1, 0, -3, -6, 2, 38, 77, -58, -658, -1240, 
[1, -1, 1, 3]: 1, 1, 0, -4, -10, 2, 89, 249, -91, -2811, -8071, 
[1, -1, 2, 0]: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
[1, -1, 2, 1]: 1, 1, 1, 0, -4, -14, -30, -33, 55, 429, 1365, 
[1, -1, 2, 2]: 1, 1, 1, -1, -10, -33, -55, 65, 842, 3230, 6137, 
[1, -1, 2, 3]: 1, 1, 1, -2, -17, -57, -72, 386, 3007, 10239, 9205, 
[1, -1, 3, 0]: 1, 1, 2, 6, 22, 89, 381, 1694, 7744, 36168, 171831, 
[1, -1, 3, 1]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[1, -1, 3, 2]: 1, 1, 2, 4, 5, -13, -147, -816, -3534, -12650, -35420, 
[1, -1, 3, 3]: 1, 1, 2, 3, -5, -77, -459, -1957, -5819, -4875, 84999, 
[1, 0, 0, 0]: 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
[1, 0, 0, 1]: 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
[1, 0, 0, 2]: 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
[1, 0, 0, 3]: 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
[1, 0, 1, 0]: 1, 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, 
[1, 0, 1, 2]: 1, 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, 
[1, 0, 2, 0]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[1, 0, 2, 1]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[1, 0, 2, 2]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[1, 0, 2, 3]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[1, 0, 3, 0]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[1, 0, 3, 1]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[1, 0, 3, 2]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[1, 0, 3, 3]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[1, 1, 0, 0]: 1, 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, 1, 0, 2]: 1, 1, 1, 3, 8, 25, 81, 274, 953, 3389, 12265, 
[1, 1, 0, 3]: 1, 1, 1, 4, 13, 50, 201, 841, 3627, 15993, 71803, 
[1, 1, 1, 0]: 1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 
[1, 1, 1, 1]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[1, 1, 1, 2]: 1, 1, 2, 6, 21, 80, 322, 1347, 5798, 25512, 114236, 
[1, 1, 1, 3]: 1, 1, 2, 7, 29, 131, 627, 3124, 16032, 84162, 449828, 
[1, 1, 2, 0]: 1, 1, 3, 10, 36, 137, 543, 2219, 9285, 39587, 171369, 
[1, 1, 2, 1]: 1, 1, 3, 11, 45, 197, 903, 4279, 20793, 103049, 518859, 
[1, 1, 2, 2]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[1, 1, 2, 3]: 1, 1, 3, 13, 66, 366, 2148, 13115, 82449, 530095, 3469401, 
[1, 1, 3, 0]: 1, 1, 4, 19, 101, 578, 3479, 21714, 139269, 912354, 6078832, 
[1, 1, 3, 1]: 1, 1, 4, 20, 113, 688, 4404, 29219, 199140, 1385904, 9807820, 
[1, 1, 3, 2]: 1, 1, 4, 21, 126, 818, 5594, 39693, 289510, 2157150, 16348960, 
[1, 1, 3, 3]: 1, 1, 4, 22, 140, 969, 7084, 53820, 420732, 3362260, 27343888, 
[1, 2, 0, 0]: 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 
[1, 2, 0, 1]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[1, 2, 0, 2]: 1, 1, 2, 7, 26, 107, 462, 2074, 9572, 45147, 216638, 
[1, 2, 0, 3]: 1, 1, 2, 9, 40, 202, 1068, 5884, 33356, 193365, 1140940, 
[1, 2, 1, 0]: 1, 1, 3, 8, 21, 55, 144, 377, 987, 2584, 6765, 
[1, 2, 1, 1]: 1, 1, 3, 10, 37, 146, 602, 2563, 11181, 49720, 224540, 
[1, 2, 1, 2]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[1, 2, 1, 3]: 1, 1, 3, 14, 75, 438, 2704, 17356, 114661, 774514, 5324812, 
[1, 2, 2, 0]: 1, 1, 4, 16, 68, 304, 1412, 6752, 33028, 164512, 831620, 
[1, 2, 2, 1]: 1, 1, 4, 18, 90, 481, 2690, 15547, 92124, 556664, 3417062, 
[1, 2, 2, 2]: 1, 1, 4, 20, 114, 702, 4550, 30585, 211270, 1490561, 10695354, 
[1, 2, 2, 3]: 1, 1, 4, 22, 140, 969, 7084, 53820, 420732, 3362260, 27343888, 
[1, 2, 3, 0]: 1, 1, 5, 27, 161, 1030, 6921, 48190, 344669, 2517303, 18695908, 
[1, 2, 3, 1]: 1, 1, 5, 29, 189, 1325, 9757, 74429, 583037, 4662653, 37911037, 
[1, 2, 3, 2]: 1, 1, 5, 31, 219, 1672, 13439, 112043, 960017, 8402085, 74791408, 
[1, 2, 3, 3]: 1, 1, 5, 33, 251, 2073, 18069, 163600, 1523731, 14504988, 140499307, 
[1, 3, 0, 0]: 1, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 
[1, 3, 0, 1]: 1, 1, 3, 9, 31, 114, 438, 1739, 7077, 29364, 123756, 
[1, 3, 0, 2]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[1, 3, 0, 3]: 1, 1, 3, 15, 82, 495, 3147, 20812, 141621, 985287, 6976369, 
[1, 3, 1, 0]: 1, 1, 4, 13, 41, 129, 406, 1278, 4023, 12664, 39865, 
[1, 3, 1, 1]: 1, 1, 4, 16, 71, 336, 1660, 8464, 44207, 235306, 1271807, 
[1, 3, 1, 2]: 1, 1, 4, 19, 104, 615, 3829, 24728, 164122, 1112641, 7671781, 
[1, 3, 1, 3]: 1, 1, 4, 22, 140, 969, 7084, 53820, 420732, 3362260, 27343888, 
[1, 3, 2, 0]: 1, 1, 5, 23, 111, 562, 2952, 15948, 88076, 495077, 2823293, 
[1, 3, 2, 1]: 1, 1, 5, 26, 150, 925, 5967, 39772, 271758, 1893431, 13400897, 
[1, 3, 2, 2]: 1, 1, 5, 29, 192, 1372, 10314, 80390, 643774, 5264984, 43788393, 
[1, 3, 2, 3]: 1, 1, 5, 32, 237, 1906, 16179, 142665, 1294115, 11998349, 113194205, 
[1, 3, 3, 0]: 1, 1, 6, 36, 236, 1656, 12192, 92960, 727824, 5817696, 47281472, 
[1, 3, 3, 1]: 1, 1, 6, 39, 284, 2223, 18267, 155445, 1358073, 12111306, 109802183, 
[1, 3, 3, 2]: 1, 1, 6, 42, 335, 2886, 26166, 246028, 2377161, 23459250, 235452723, 
[1, 3, 3, 3]: 1, 1, 6, 45, 389, 3648, 36090, 370793, 3918225, 42314583, 464953943, 
[2, -3, 0, 0]: 1, 2, -5, 0, 13, -20, 15, -6, 1, 0, 0, 
[2, -3, 0, 1]: 1, 2, -5, -6, 37, -8, -228, 364, 1040, -4014, -1500, 
[2, -3, 0, 2]: 1, 2, -5, -12, 55, 94, -711, -682, 9864, 2112, -140924, 
[2, -3, 0, 3]: 1, 2, -5, -18, 67, 280, -1176, -5274, 23575, 110082, -511041, 
[2, -3, 1, 0]: 1, 2, -3, -8, 12, 30, -44, -102, 156, 328, -537, 
[2, -3, 1, 1]: 1, 2, -3, -14, 18, 126, -119, -1244, 774, 13006, -4015, 
[2, -3, 1, 2]: 1, 2, -3, -20, 18, 288, 4, -4612, -4623, 76492, 161669, 
[2, -3, 1, 3]: 1, 2, -3, -26, 12, 510, 553, -10782, -31599, 219598, 1215804, 
[2, -3, 2, 0]: 1, 2, -1, -10, -11, 32, 120, 62, -560, -1564, -46, 
[2, -3, 2, 1]: 1, 2, -1, -16, -23, 116, 519, -192, -6963, -14170, 59020, 
[2, -3, 2, 2]: 1, 2, -1, -22, -41, 242, 1404, -578, -30073, -78280, 417064, 
[2, -3, 2, 3]: 1, 2, -1, -28, -65, 404, 2973, -334, -85490, -305206, 1486457, 
[2, -3, 3, 0]: 1, 2, 1, -6, -24, -48, -21, 268, 1297, 3438, 4173, 
[2, -3, 3, 1]: 1, 2, 1, -12, -54, -72, 408, 2786, 6353, -14244, -167573, 
[2, -3, 3, 2]: 1, 2, 1, -18, -90, -78, 1461, 8874, 10602, -161634, -1110279, 
[2, -3, 3, 3]: 1, 2, 1, -24, -132, -72, 3306, 20416, 8980, -638088, -4067448, 
[2, -2, 0, 0]: 1, 2, -3, -2, 6, -4, 1, 0, 0, 0, 0, 
[2, -2, 0, 1]: 1, 2, -3, -6, 14, 14, -61, -12, 242, -126, -857, 
[2, -2, 0, 2]: 1, 2, -3, -10, 18, 68, -131, -530, 1062, 4476, -9198, 
[2, -2, 0, 3]: 1, 2, -3, -14, 18, 154, -101, -1950, -88, 26196, 20655, 
[2, -2, 1, 0]: 1, 2, -1, -6, -1, 14, 10, -26, -35, 38, 92, 
[2, -2, 1, 1]: 1, 2, -1, -10, -5, 52, 84, -244, -807, 820, 6479, 
[2, -2, 1, 2]: 1, 2, -1, -14, -13, 110, 314, -676, -4781, -242, 58758, 
[2, -2, 1, 3]: 1, 2, -1, -18, -25, 184, 788, -1082, -15929, -20126, 240935, 
[2, -2, 2, 0]: 1, 2, 1, -4, -12, -14, 10, 80, 172, 136, -355, 
[2, -2, 2, 1]: 1, 2, 1, -8, -28, -20, 168, 682, 594, -4524, -20176, 
[2, -2, 2, 2]: 1, 2, 1, -12, -48, -22, 546, 2298, 510, -33478, -137313, 
[2, -2, 2, 3]: 1, 2, 1, -16, -72, -24, 1212, 5660, -512, -126232, -563128, 
[2, -2, 3, 0]: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
[2, -2, 3, 1]: 1, 2, 3, 0, -23, -108, -303, -388, 1397, 12038, 48298, 
[2, -2, 3, 2]: 1, 2, 3, -4, -55, -234, -429, 1530, 16739, 71500, 108445, 
[2, -2, 3, 3]: 1, 2, 3, -8, -91, -376, -323, 6842, 52735, 170994, -282286, 
[2, -1, 0, 0]: 1, 2, -1, -2, 1, 0, 0, 0, 0, 0, 0, 
[2, -1, 0, 1]: 1, 2, -1, -4, 1, 6, -1, -8, 1, 10, -1, 
[2, -1, 0, 2]: 1, 2, -1, -6, -1, 18, 16, -50, -93, 112, 428, 
[2, -1, 0, 3]: 1, 2, -1, -8, -5, 34, 73, -100, -592, -208, 3614, 
[2, -1, 1, 0]: 1, 2, 1, -2, -4, -2, 3, 6, 3, -4, -8, 
[2, -1, 1, 1]: 1, 2, 1, -4, -10, -4, 28, 64, 9, -230, -451, 
[2, -1, 1, 2]: 1, 2, 1, -6, -18, -8, 89, 266, 62, -1684, -4710, 
[2, -1, 1, 3]: 1, 2, 1, -8, -28, -16, 198, 756, 400, -6556, -25532, 
[2, -1, 2, 0]: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
[2, -1, 2, 1]: 1, 2, 3, 2, -7, -36, -96, -154, 0, 1014, 4134, 
[2, -1, 2, 2]: 1, 2, 3, 0, -21, -88, -195, -26, 1870, 9044, 22477, 
[2, -1, 2, 3]: 1, 2, 3, -2, -37, -152, -288, 582, 7159, 29490, 49055, 
[2, -1, 3, 0]: 1, 2, 5, 16, 60, 246, 1064, 4770, 21952, 103088, 491987, 
[2, -1, 3, 1]: 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 
[2, -1, 3, 2]: 1, 2, 5, 12, 22, 0, -284, -1938, -9367, -36938, -118105, 
[2, -1, 3, 3]: 1, 2, 5, 10, 0, -152, -1083, -5170, -17825, -31200, 135749, 
[2, 0, 0, 0]: 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 
[2, 0, 0, 1]: 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 
[2, 0, 0, 2]: 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 
[2, 0, 0, 3]: 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 
[2, 0, 1, 0]: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
[2, 0, 1, 1]: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
[2, 0, 1, 2]: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
[2, 0, 1, 3]: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
[2, 0, 2, 0]: 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 
[2, 0, 2, 1]: 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 
[2, 0, 2, 2]: 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 
[2, 0, 2, 3]: 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 
[2, 0, 3, 0]: 1, 2, 7, 30, 143, 728, 3876, 21318, 120175, 690690, 4032015, 
[2, 0, 3, 1]: 1, 2, 7, 30, 143, 728, 3876, 21318, 120175, 690690, 4032015, 
[2, 0, 3, 2]: 1, 2, 7, 30, 143, 728, 3876, 21318, 120175, 690690, 4032015, 
[2, 0, 3, 3]: 1, 2, 7, 30, 143, 728, 3876, 21318, 120175, 690690, 4032015, 
[2, 1, 0, 0]: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
[2, 1, 0, 1]: 1, 2, 3, 6, 13, 30, 72, 178, 450, 1158, 3023, 
[2, 1, 0, 2]: 1, 2, 3, 8, 23, 72, 237, 808, 2830, 10118, 36779, 
[2, 1, 0, 3]: 1, 2, 3, 10, 35, 134, 544, 2288, 9907, 43830, 197300, 
[2, 1, 1, 0]: 1, 2, 5, 12, 28, 64, 144, 320, 704, 1536, 3328, 
[2, 1, 1, 1]: 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 
[2, 1, 1, 2]: 1, 2, 5, 16, 58, 226, 924, 3910, 16979, 75232, 338776, 
[2, 1, 1, 3]: 1, 2, 5, 18, 76, 348, 1681, 8432, 43495, 229260, 1229371, 
[2, 1, 2, 0]: 1, 2, 7, 26, 101, 406, 1676, 7066, 30302, 131782, 579867, 
[2, 1, 2, 1]: 1, 2, 7, 28, 121, 550, 2591, 12536, 61921, 310954, 1582791, 
[2, 1, 2, 2]: 1, 2, 7, 30, 143, 728, 3876, 21318, 120175, 690690, 4032015, 
[2, 1, 2, 3]: 1, 2, 7, 32, 167, 942, 5593, 34438, 217888, 1407938, 9252168, 
[2, 1, 3, 0]: 1, 2, 9, 46, 256, 1510, 9283, 58848, 381963, 2525916, 16958498, 
[2, 1, 3, 1]: 1, 2, 9, 48, 282, 1762, 11488, 77270, 532239, 3735488, 26617976, 
[2, 1, 3, 2]: 1, 2, 9, 50, 310, 2056, 14273, 102410, 753390, 5651948, 43074218, 
[2, 1, 3, 3]: 1, 2, 9, 52, 340, 2394, 17710, 135720, 1068012, 8579560, 70068713, 
[2, 2, 0, 0]: 1, 2, 5, 10, 18, 30, 47, 70, 100, 138, 185, 
[2, 2, 0, 1]: 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 
[2, 2, 0, 2]: 1, 2, 5, 18, 70, 294, 1291, 5864, 27314, 129766, 626367, 
[2, 2, 0, 3]: 1, 2, 5, 22, 102, 520, 2781, 15432, 87988, 512362, 3034190, 
[2, 2, 1, 0]: 1, 2, 7, 22, 67, 200, 588, 1708, 4913, 14018, 39725, 
[2, 2, 1, 1]: 1, 2, 7, 26, 103, 426, 1818, 7946, 35389, 160024, 732730, 
[2, 2, 1, 2]: 1, 2, 7, 30, 143, 728, 3876, 21318, 120175, 690690, 4032015, 
[2, 2, 1, 3]: 1, 2, 7, 34, 187, 1110, 6930, 44848, 298147, 2023898, 13970030, 
[2, 2, 2, 0]: 1, 2, 9, 40, 184, 872, 4232, 20936, 105208, 535624, 2757000, 
[2, 2, 2, 1]: 1, 2, 9, 44, 232, 1286, 7386, 43562, 262278, 1605372, 9959697, 
[2, 2, 2, 2]: 1, 2, 9, 48, 284, 1792, 11816, 80446, 561186, 3990398, 28815594, 
[2, 2, 2, 3]: 1, 2, 9, 52, 340, 2394, 17710, 135720, 1068012, 8579560, 70068713, 
[2, 2, 3, 0]: 1, 2, 11, 64, 401, 2652, 18241, 129216, 936469, 6911238, 51764834, 
[2, 2, 3, 1]: 1, 2, 11, 68, 461, 3318, 24895, 192584, 1525073, 12302426, 100738403, 
[2, 2, 3, 2]: 1, 2, 11, 72, 525, 4092, 33373, 281262, 2430135, 21410188, 191615688, 
[2, 2, 3, 3]: 1, 2, 11, 76, 593, 4978, 43883, 400634, 3755171, 35926638, 349411467, 
[2, 3, 0, 0]: 1, 2, 7, 18, 41, 86, 168, 308, 534, 882, 1397, 
[2, 3, 0, 1]: 1, 2, 7, 24, 89, 344, 1371, 5596, 23273, 98268, 420156, 
[2, 3, 0, 2]: 1, 2, 7, 30, 143, 728, 3876, 21318, 120175, 690690, 4032015, 
[2, 3, 0, 3]: 1, 2, 7, 36, 203, 1244, 8001, 53348, 365322, 2554278, 18158531, 
[2, 3, 1, 0]: 1, 2, 9, 34, 124, 444, 1567, 5466, 18885, 64732, 220403, 
[2, 3, 1, 1]: 1, 2, 9, 40, 190, 942, 4816, 25208, 134415, 727570, 3987346, 
[2, 3, 1, 2]: 1, 2, 9, 46, 262, 1590, 10081, 65986, 442518, 3024772, 20996141, 
[2, 3, 1, 3]: 1, 2, 9, 52, 340, 2394, 17710, 135720, 1068012, 8579560, 70068713, 
[2, 3, 2, 0]: 1, 2, 11, 56, 293, 1576, 8667, 48526, 275741, 1586342, 9222296, 
[2, 3, 2, 1]: 1, 2, 11, 62, 377, 2410, 15960, 108528, 753330, 5315882, 38020105, 
[2, 3, 2, 2]: 1, 2, 11, 68, 467, 3418, 26133, 206264, 1667908, 13746476, 115050074, 
[2, 3, 2, 3]: 1, 2, 11, 74, 563, 4606, 39564, 351916, 3213503, 29950478, 283758500, 
[2, 3, 3, 0]: 1, 2, 13, 84, 580, 4216, 31824, 247168, 1962800, 15866016, 130122304, 
[2, 3, 3, 1]: 1, 2, 13, 90, 682, 5482, 45909, 396252, 3500290, 31491588, 287565949, 
[2, 3, 3, 2]: 1, 2, 13, 96, 790, 6946, 63888, 607160, 5915019, 58756722, 592876446, 
[2, 3, 3, 3]: 1, 2, 13, 102, 904, 8614, 86169, 892552, 9490757, 103001376, 1136313046, 
[3, -3, 0, 0]: 1, 3, -6, -8, 33, -24, -39, 108, -123, 84, -36, 
[3, -3, 0, 1]: 1, 3, -6, -17, 60, 57, -507, 240, 3426, -6561, -16371, 
[3, -3, 0, 2]: 1, 3, -6, -26, 78, 264, -1146, -2733, 17604, 26196, -274359, 
[3, -3, 0, 3]: 1, 3, -6, -35, 87, 588, -1578, -11511, 32223, 245883, -706824, 
[3, -3, 1, 0]: 1, 3, -3, -17, 12, 81, -47, -339, 189, 1312, -762, 
[3, -3, 1, 1]: 1, 3, -3, -26, 12, 252, -2, -2565, -1002, 27049, 20856, 
[3, -3, 1, 2]: 1, 3, -3, -35, 3, 513, 484, -8040, -16791, 127270, 444933, 
[3, -3, 1, 3]: 1, 3, -3, -44, -15, 855, 1744, -17187, -72945, 316033, 2507484, 
[3, -3, 2, 0]: 1, 3, 0, -17, -30, 45, 269, 273, -1089, -4045, -1959, 
[3, -3, 2, 1]: 1, 3, 0, -26, -57, 162, 1061, 495, -12618, -37492, 80952, 
[3, -3, 2, 2]: 1, 3, 0, -35, -93, 333, 2681, 1356, -51381, -186067, 562947, 
[3, -3, 2, 3]: 1, 3, 0, -44, -138, 549, 5417, 4386, -140220, -654358, 1888626, 
[3, -3, 3, 0]: 1, 3, 3, -8, -45, -108, -90, 465, 2685, 7737, 10953, 
[3, -3, 3, 1]: 1, 3, 3, -17, -99, -189, 558, 5223, 15018, -13794, -309180, 
[3, -3, 3, 2]: 1, 3, 3, -26, -162, -252, 2196, 16596, 32211, -243639, -2102175, 
[3, -3, 3, 3]: 1, 3, 3, -35, -234, -306, 5067, 37743, 49764, -1000848, -7681428, 
[3, -2, 0, 0]: 1, 3, -3, -8, 12, 3, -17, 15, -6, 1, 0, 
[3, -2, 0, 1]: 1, 3, -3, -14, 18, 54, -107, -168, 564, 338, -2631, 
[3, -2, 0, 2]: 1, 3, -3, -20, 18, 153, -131, -1272, 1062, 11190, -9198, 
[3, -2, 0, 3]: 1, 3, -3, -26, 12, 294, 67, -3681, -3618, 48028, 87867, 
[3, -2, 1, 0]: 1, 3, 0, -11, -9, 27, 44, -45, -141, 31, 360, 
[3, -2, 1, 1]: 1, 3, 0, -17, -21, 84, 236, -306, -1989, -22, 14388, 
[3, -2, 1, 2]: 1, 3, 0, -23, -39, 165, 710, -636, -9591, -9387, 104364, 
[3, -2, 1, 3]: 1, 3, 0, -29, -63, 264, 1592, -501, -28773, -62957, 374580, 
[3, -2, 2, 0]: 1, 3, 3, -5, -24, -39, 0, 165, 444, 496, -591, 
[3, -2, 2, 1]: 1, 3, 3, -11, -54, -72, 246, 1419, 2184, -6721, -43422, 
[3, -2, 2, 2]: 1, 3, 3, -17, -90, -105, 840, 4644, 4896, -54150, -290565, 
[3, -2, 2, 3]: 1, 3, 3, -23, -132, -144, 1878, 11076, 9186, -204572, -1149792, 
[3, -2, 3, 0]: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 
[3, -2, 3, 1]: 1, 3, 6, 4, -33, -198, -650, -1164, 1401, 21593, 100662, 
[3, -2, 3, 2]: 1, 3, 6, -2, -87, -441, -1064, 1539, 28737, 144210, 315510, 
[3, -2, 3, 3]: 1, 3, 6, -8, -147, -714, -1148, 9867, 94185, 368329, -90024, 
[3, -1, 0, 0]: 1, 3, 0, -5, 0, 3, -1, 0, 0, 0, 0, 
[3, -1, 0, 1]: 1, 3, 0, -8, -3, 15, 8, -24, -15, 35, 24, 
[3, -1, 0, 2]: 1, 3, 0, -11, -9, 33, 59, -78, -285, 79, 1173, 
[3, -1, 0, 3]: 1, 3, 0, -14, -18, 54, 182, -78, -1287, -1365, 6741, 
[3, -1, 1, 0]: 1, 3, 3, -2, -9, -9, 3, 18, 18, -4, -30, 
[3, -1, 1, 1]: 1, 3, 3, -5, -21, -21, 42, 162, 135, -407, -1320, 
[3, -1, 1, 2]: 1, 3, 3, -8, -36, -39, 135, 600, 582, -2802, -11502, 
[3, -1, 1, 3]: 1, 3, 3, -11, -54, -66, 297, 1575, 1980, -10300, -55392, 
[3, -1, 2, 0]: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 
[3, -1, 2, 1]: 1, 3, 6, 7, -6, -63, -209, -429, -351, 1482, 8568, 
[3, -1, 2, 2]: 1, 3, 6, 4, -30, -165, -455, -432, 2754, 17765, 54549, 
[3, -1, 2, 3]: 1, 3, 6, 1, -57, -288, -710, 321, 12063, 60055, 138696, 
[3, -1, 3, 0]: 1, 3, 9, 31, 120, 501, 2195, 9939, 46107, 217938, 1045752, 
[3, -1, 3, 1]: 1, 3, 9, 28, 90, 297, 1001, 3432, 11934, 41990, 149226, 
[3, -1, 3, 2]: 1, 3, 9, 25, 57, 63, -340, -3249, -17820, -77165, -274365, 
[3, -1, 3, 3]: 1, 3, 9, 22, 21, -204, -1843, -9867, -38415, -92742, 97092, 
[3, 0, 0, 0]: 1, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0, 
[3, 0, 0, 1]: 1, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0, 
[3, 0, 0, 2]: 1, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0, 
[3, 0, 0, 3]: 1, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0, 
[3, 0, 1, 0]: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 
[3, 0, 1, 1]: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 
[3, 0, 1, 2]: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 
[3, 0, 1, 3]: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 
[3, 0, 2, 0]: 1, 3, 9, 28, 90, 297, 1001, 3432, 11934, 41990, 149226, 
[3, 0, 2, 1]: 1, 3, 9, 28, 90, 297, 1001, 3432, 11934, 41990, 149226, 
[3, 0, 2, 2]: 1, 3, 9, 28, 90, 297, 1001, 3432, 11934, 41990, 149226, 
[3, 0, 2, 3]: 1, 3, 9, 28, 90, 297, 1001, 3432, 11934, 41990, 149226, 
[3, 0, 3, 0]: 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 8414640, 
[3, 0, 3, 1]: 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 8414640, 
[3, 0, 3, 2]: 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 8414640, 
[3, 0, 3, 3]: 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 8414640, 
[3, 1, 0, 0]: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 
[3, 1, 0, 1]: 1, 3, 6, 13, 30, 72, 178, 450, 1158, 3023, 7986, 
[3, 1, 0, 2]: 1, 3, 6, 16, 48, 153, 511, 1761, 6219, 22383, 81804, 
[3, 1, 0, 3]: 1, 3, 6, 19, 69, 267, 1093, 4629, 20142, 89473, 404076, 
[3, 1, 1, 0]: 1, 3, 9, 25, 66, 168, 416, 1008, 2400, 5632, 13056, 
[3, 1, 1, 1]: 1, 3, 9, 28, 90, 297, 1001, 3432, 11934, 41990, 149226, 
[3, 1, 1, 2]: 1, 3, 9, 31, 117, 468, 1949, 8361, 36693, 163956, 743388, 
[3, 1, 1, 3]: 1, 3, 9, 34, 147, 684, 3341, 16896, 87702, 464566, 2501178, 
[3, 1, 2, 0]: 1, 3, 12, 49, 204, 864, 3714, 16170, 71178, 316303, 1417248, 
[3, 1, 2, 1]: 1, 3, 12, 52, 237, 1119, 5424, 26832, 134913, 687443, 3541932, 
[3, 1, 2, 2]: 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 8414640, 
[3, 1, 2, 3]: 1, 3, 12, 58, 312, 1794, 10794, 67113, 427800, 2780677, 18360504, 
[3, 1, 3, 0]: 1, 3, 15, 82, 477, 2901, 18235, 117555, 773085, 5166478, 34987170, 
[3, 1, 3, 1]: 1, 3, 15, 85, 519, 3330, 22135, 151089, 1052805, 7458236, 53554548, 
[3, 1, 3, 2]: 1, 3, 15, 88, 564, 3825, 26983, 195960, 1455270, 11000454, 84358182, 
[3, 1, 3, 3]: 1, 3, 15, 91, 612, 4389, 32890, 254475, 2017356, 16301164, 133767543, 
[3, 2, 0, 0]: 1, 3, 9, 22, 48, 96, 179, 315, 528, 849, 1317, 
[3, 2, 0, 1]: 1, 3, 9, 28, 90, 297, 1001, 3432, 11934, 41990, 149226, 
[3, 2, 0, 2]: 1, 3, 9, 34, 138, 594, 2657, 12234, 57594, 275956, 1341297, 
[3, 2, 0, 3]: 1, 3, 9, 40, 192, 993, 5375, 30081, 172650, 1010640, 6010530, 
[3, 2, 1, 0]: 1, 3, 12, 43, 147, 486, 1566, 4944, 15351, 47009, 142278, 
[3, 2, 1, 1]: 1, 3, 12, 49, 207, 897, 3966, 17823, 81177, 373906, 1738734, 
[3, 2, 1, 2]: 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 8414640, 
[3, 2, 1, 3]: 1, 3, 12, 61, 345, 2085, 13182, 86106, 576543, 3936029, 27294390, 
[3, 2, 2, 0]: 1, 3, 15, 73, 360, 1800, 9112, 46632, 240936, 1255336, 6589080, 
[3, 2, 2, 1]: 1, 3, 15, 79, 438, 2517, 14854, 89484, 548004, 3401373, 21349257, 
[3, 2, 2, 2]: 1, 3, 15, 85, 522, 3378, 22684, 156585, 1104198, 7920110, 57602850, 
[3, 2, 2, 3]: 1, 3, 15, 91, 612, 4389, 32890, 254475, 2017356, 16301164, 133767543, 
[3, 2, 3, 0]: 1, 3, 18, 112, 735, 5022, 35378, 255210, 1876155, 14005971, 105896964, 
[3, 2, 3, 1]: 1, 3, 18, 118, 831, 6141, 46976, 368808, 2954805, 24061223, 198561534, 
[3, 2, 3, 2]: 1, 3, 18, 124, 933, 7428, 61514, 524451, 4572405, 40577344, 365324520, 
[3, 2, 3, 3]: 1, 3, 18, 130, 1041, 8889, 79310, 730593, 6895575, 66337179, 648087750, 
[3, 3, 0, 0]: 1, 3, 12, 37, 102, 258, 606, 1335, 2781, 5514, 10461, 
[3, 3, 0, 1]: 1, 3, 12, 46, 183, 744, 3081, 12957, 55194, 237681, 1033065, 
[3, 3, 0, 2]: 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 8414640, 
[3, 3, 0, 3]: 1, 3, 12, 64, 372, 2319, 15105, 101649, 701073, 4929657, 35207220, 
[3, 3, 1, 0]: 1, 3, 15, 64, 261, 1032, 3982, 15066, 56094, 206068, 748452, 
[3, 3, 1, 1]: 1, 3, 15, 73, 369, 1914, 10129, 54480, 296964, 1636891, 9108594, 
[3, 3, 1, 2]: 1, 3, 15, 82, 486, 3030, 19588, 130110, 882615, 6088834, 42585840, 
[3, 3, 1, 3]: 1, 3, 15, 91, 612, 4389, 32890, 254475, 2017356, 16301164, 133767543, 
[3, 3, 2, 0]: 1, 3, 18, 100, 561, 3186, 18293, 106062, 620289, 3655625, 21691497, 
[3, 3, 2, 1]: 1, 3, 18, 109, 696, 4608, 31334, 217521, 1535157, 10981430, 79440135, 
[3, 3, 2, 2]: 1, 3, 18, 118, 840, 6300, 49028, 392196, 3204927, 26638715, 224507811, 
[3, 3, 2, 3]: 1, 3, 18, 127, 993, 8271, 71951, 646053, 5942520, 55707449, 530285664, 
[3, 3, 3, 0]: 1, 3, 21, 145, 1050, 7896, 61116, 483864, 3900912, 31918896, 264413904, 
[3, 3, 3, 1]: 1, 3, 21, 154, 1212, 10002, 85398, 748089, 6685986, 60725082, 558865635, 
[3, 3, 3, 2]: 1, 3, 21, 163, 1383, 12414, 115899, 1113942, 10948320, 109528719, 1111636782, 
[3, 3, 3, 3]: 1, 3, 21, 172, 1563, 15141, 153240, 1601160, 17140686, 187026210, 2072333697, 

[1, -3, 0, 0]: 1, 1, -3, 6, -10, 15, -21, 28, -36, 45, -55, 
[1, -3, 0, 1]: 1, 1, -3, 3, 11, -54, 66, 297, -1575, 1980, 10300, 
[1, -3, 0, 2]: 1, 1, -3, 0, 29, -63, -264, 1592, 501, -28773, 62957, 
[1, -3, 0, 3]: 1, 1, -3, -3, 44, -15, -855, 1744, 17187, -72945, -316033, 
[1, -3, 1, 0]: 1, 1, -2, 1, 3, -7, 4, 10, -25, 16, 33, 
[1, -3, 1, 1]: 1, 1, -2, -2, 15, -4, -122, 204, 903, -3374, -4635, 
[1, -3, 1, 2]: 1, 1, -2, -5, 24, 47, -383, -472, 6862, 3313, -129943, 
[1, -3, 1, 3]: 1, 1, -2, -8, 30, 143, -638, -3272, 15854, 84628, -430344, 
[1, -3, 2, 0]: 1, 1, -1, -1, 1, 2, 0, -4, -4, 5, 15, 
[1, -3, 2, 1]: 1, 1, -1, -4, 4, 29, -15, -248, -14, 2267, 1531, 
[1, -3, 2, 2]: 1, 1, -1, -7, 4, 92, 42, -1398, -2346, 21800, 69739, 
[1, -3, 2, 3]: 1, 1, -1, -10, 1, 188, 297, -3901, -14665, 75737, 550503, 
[1, -3, 3, 0]: 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
[1, -3, 3, 1]: 1, 1, 0, -3, -6, 3, 45, 95, -75, -930, -1997, 
[1, -3, 3, 2]: 1, 1, 0, -6, -15, 30, 294, 460, -3231, -18270, -4367, 
[1, -3, 3, 3]: 1, 1, 0, -9, -27, 78, 858, 1347, -16503, -100581, 53847, 
[1, -2, 0, 0]: 1, 1, -2, 3, -4, 5, -6, 7, -8, 9, -10, 
[1, -2, 0, 1]: 1, 1, -2, 1, 6, -18, 8, 89, -266, 62, 1684, 
[1, -2, 0, 2]: 1, 1, -2, -1, 14, -13, -110, 314, 676, -4781, 242, 
[1, -2, 0, 3]: 1, 1, -2, -3, 20, 18, -288, 4, 4612, -4623, -76492, 
[1, -2, 1, 0]: 1, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, 
[1, -2, 1, 1]: 1, 1, -1, -2, 5, 6, -30, -13, 189, -56, -1188, 
[1, -2, 1, 2]: 1, 1, -1, -4, 7, 33, -68, -344, 767, 4035, -9425, 
[1, -2, 1, 3]: 1, 1, -1, -6, 7, 78, -52, -1260, 13, 22346, 15928, 
[1, -2, 2, 0]: 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
[1, -2, 2, 1]: 1, 1, 0, -2, -2, 5, 14, -5, -72, -68, 278, 
[1, -2, 2, 2]: 1, 1, 0, -4, -6, 22, 94, -47, -1098, -1615, 9658, 
[1, -2, 2, 3]: 1, 1, 0, -6, -12, 49, 292, -56, -5156, -12620, 62940, 
[1, -2, 3, 0]: 1, 1, 1, 3, 9, 30, 105, 382, 1429, 5463, 21248, 
[1, -2, 3, 1]: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
[1, -2, 3, 2]: 1, 1, 1, -1, -9, -24, -13, 171, 805, 1493, -2496, 
[1, -2, 3, 3]: 1, 1, 1, -3, -21, -47, 105, 1228, 3875, -3912, -92017, 
[1, -1, 0, 0]: 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 
[1, -1, 0, 1]: 1, 1, -1, 0, 2, -3, -1, 11, -15, -13, 77, 
[1, -1, 0, 2]: 1, 1, -1, -1, 4, 1, -21, 14, 111, -195, -529, 
[1, -1, 0, 3]: 1, 1, -1, -2, 5, 12, -41, -89, 391, 733, -4051, 
[1, -1, 1, 0]: 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
[1, -1, 1, 1]: 1, 1, 0, -1, 0, 2, 0, -5, 0, 14, 0, 
[1, -1, 1, 2]: 1, 1, 0, -2, -1, 8, 10, -37, -84, 168, 660, 
[1, -1, 1, 3]: 1, 1, 0, -3, -3, 17, 45, -90, -546, 130, 5832, 
[1, -1, 2, 0]: 1, 1, 1, 2, 4, 9, 21, 51, 127, 323, 835, 
[1, -1, 2, 1]: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
[1, -1, 2, 2]: 1, 1, 1, 0, -3, -7, -4, 24, 85, 99, -215, 
[1, -1, 2, 3]: 1, 1, 1, -1, -8, -16, 16, 195, 491, -317, -6293, 
[1, -1, 3, 0]: 1, 1, 2, 7, 27, 114, 507, 2342, 11125, 54002, 266684, 
[1, -1, 3, 1]: 1, 1, 2, 6, 21, 80, 322, 1347, 5798, 25512, 114236, 
[1, -1, 3, 2]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[1, -1, 3, 3]: 1, 1, 2, 4, 6, -1, -58, -304, -1090, -2876, -4216, 
[1, 0, 0, 0]: 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
[1, 0, 0, 1]: 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
[1, 0, 0, 2]: 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
[1, 0, 0, 3]: 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
[1, 0, 1, 0]: 1, 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, 
[1, 0, 1, 2]: 1, 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, 
[1, 0, 2, 0]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[1, 0, 2, 1]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[1, 0, 2, 2]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[1, 0, 2, 3]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[1, 0, 3, 0]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[1, 0, 3, 1]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[1, 0, 3, 2]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[1, 0, 3, 3]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[1, 1, 0, 0]: 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 
[1, 1, 0, 1]: 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, 1, 0, 3]: 1, 1, 1, 3, 6, 16, 42, 114, 322, 918, 2673, 
[1, 1, 1, 0]: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 
[1, 1, 1, 1]: 1, 1, 2, 4, 9, 21, 51, 127, 323, 835, 2188, 
[1, 1, 1, 2]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[1, 1, 1, 3]: 1, 1, 2, 6, 20, 72, 273, 1073, 4333, 17869, 74937, 
[1, 1, 2, 0]: 1, 1, 3, 9, 31, 113, 431, 1697, 6847, 28161, 117631, 
[1, 1, 2, 1]: 1, 1, 3, 10, 38, 154, 654, 2871, 12925, 59345, 276835, 
[1, 1, 2, 2]: 1, 1, 3, 11, 46, 207, 979, 4797, 24138, 123998, 647615, 
[1, 1, 2, 3]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[1, 1, 3, 0]: 1, 1, 4, 18, 94, 529, 3135, 19270, 121732, 785496, 5155167, 
[1, 1, 3, 1]: 1, 1, 4, 19, 104, 614, 3816, 24595, 162896, 1101922, 7580904, 
[1, 1, 3, 2]: 1, 1, 4, 20, 115, 715, 4683, 31824, 222300, 1586310, 11514030, 
[1, 1, 3, 3]: 1, 1, 4, 21, 127, 833, 5763, 41401, 305877, 2309385, 17739561, 
[1, 2, 0, 0]: 1, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 
[1, 2, 0, 1]: 1, 1, 2, 3, 6, 11, 22, 44, 90, 187, 392, 
[1, 2, 0, 2]: 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 
[1, 2, 0, 3]: 1, 1, 2, 7, 24, 95, 386, 1641, 7150, 31844, 144216, 
[1, 2, 1, 0]: 1, 1, 3, 6, 13, 28, 60, 129, 277, 595, 1278, 
[1, 2, 1, 1]: 1, 1, 3, 8, 25, 81, 274, 953, 3389, 12265, 45025, 
[1, 2, 1, 2]: 1, 1, 3, 10, 39, 162, 708, 3202, 14867, 70448, 339324, 
[1, 2, 1, 3]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[1, 2, 2, 0]: 1, 1, 4, 14, 56, 237, 1046, 4762, 22198, 105430, 508384, 
[1, 2, 2, 1]: 1, 1, 4, 16, 74, 364, 1876, 9993, 54582, 304040, 1720576, 
[1, 2, 2, 2]: 1, 1, 4, 18, 94, 527, 3108, 18993, 119214, 763997, 4978304, 
[1, 2, 2, 3]: 1, 1, 4, 20, 116, 728, 4818, 33100, 233824, 1687764, 12393520, 
[1, 2, 3, 0]: 1, 1, 5, 25, 145, 905, 5941, 40433, 282721, 2018897, 14661349, 
[1, 2, 3, 1]: 1, 1, 5, 27, 169, 1138, 8061, 59188, 446455, 3438863, 26935372, 
[1, 2, 3, 2]: 1, 1, 5, 29, 195, 1415, 10815, 85748, 698763, 5816595, 49246703, 
[1, 2, 3, 3]: 1, 1, 5, 31, 223, 1738, 14289, 121985, 1070995, 9609132, 87716242, 
[1, 3, 0, 0]: 1, 1, 3, 3, 1, 0, 0, 0, 0, 0, 0, 
[1, 3, 0, 1]: 1, 1, 3, 6, 16, 42, 114, 322, 918, 2673, 7875, 
[1, 3, 0, 2]: 1, 1, 3, 9, 34, 132, 546, 2327, 10191, 45534, 206788, 
[1, 3, 0, 3]: 1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 
[1, 3, 1, 0]: 1, 1, 4, 10, 26, 69, 181, 476, 1252, 3292, 8657, 
[1, 3, 1, 1]: 1, 1, 4, 13, 50, 201, 841, 3627, 15993, 71803, 327082, 
[1, 3, 1, 2]: 1, 1, 4, 16, 77, 393, 2113, 11761, 67217, 392140, 2325691, 
[1, 3, 1, 3]: 1, 1, 4, 19, 107, 648, 4144, 27500, 187654, 1308361, 9280049, 
[1, 3, 2, 0]: 1, 1, 5, 20, 90, 430, 2136, 10937, 57307, 305822, 1656482, 
[1, 3, 2, 1]: 1, 1, 5, 23, 123, 700, 4170, 25677, 162101, 1043603, 6825429, 
[1, 3, 2, 2]: 1, 1, 5, 26, 159, 1042, 7185, 51340, 376806, 2823734, 21516113, 
[1, 3, 2, 3]: 1, 1, 5, 29, 198, 1459, 11343, 91541, 759664, 6441671, 55570406, 
[1, 3, 3, 0]: 1, 1, 6, 33, 209, 1425, 10206, 75751, 577494, 4495368, 35582439, 
[1, 3, 3, 1]: 1, 1, 6, 36, 251, 1881, 14817, 120950, 1014042, 8680377, 75552553, 
[1, 3, 3, 2]: 1, 1, 6, 39, 296, 2421, 20853, 186300, 1710522, 16041834, 153014400, 
[1, 3, 3, 3]: 1, 1, 6, 42, 344, 3048, 28491, 276517, 2759943, 28150473, 292122423, 
[2, -3, 0, 0]: 1, 2, -5, 6, 1, -26, 84, -196, 390, -702, 1177, 
[2, -3, 0, 1]: 1, 2, -5, 0, 37, -104, -33, 1116, -3155, -1764, 40160, 
[2, -3, 0, 2]: 1, 2, -5, -6, 67, -68, -828, 3034, 6611, -69750, 54019, 
[2, -3, 0, 3]: 1, 2, -5, -12, 91, 76, -1995, 1604, 45018, -118170, -966557, 
[2, -3, 1, 0]: 1, 2, -3, -2, 12, -12, -17, 62, -51, -92, 291, 
[2, -3, 1, 1]: 1, 2, -3, -8, 30, 30, -308, 120, 2943, -5390, -24090, 
[2, -3, 1, 2]: 1, 2, -3, -14, 42, 162, -743, -2138, 14418, 28324, -292163, 
[2, -3, 1, 3]: 1, 2, -3, -20, 48, 378, -1046, -8872, 26328, 232840, -720327, 
[2, -3, 2, 0]: 1, 2, -1, -4, 1, 8, 3, -14, -19, 14, 60, 
[2, -3, 2, 1]: 1, 2, -1, -10, 1, 74, 36, -616, -710, 5354, 10329, 
[2, -3, 2, 2]: 1, 2, -1, -16, -5, 206, 309, -2952, -8844, 41852, 216142, 
[2, -3, 2, 3]: 1, 2, -1, -22, -17, 398, 1068, -7604, -41485, 124382, 1395768, 
[2, -3, 3, 0]: 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 
[2, -3, 3, 1]: 1, 2, 1, -6, -18, -6, 105, 316, 58, -2316, -6955, 
[2, -3, 3, 2]: 1, 2, 1, -12, -42, 30, 684, 1688, -5677, -47430, -58714, 
[2, -3, 3, 3]: 1, 2, 1, -18, -72, 102, 1953, 4896, -30987, -253824, -157962, 
[2, -2, 0, 0]: 1, 2, -3, 2, 2, -10, 23, -42, 68, -102, 145, 
[2, -2, 0, 1]: 1, 2, -3, -2, 18, -28, -43, 278, -386, -964, 5154, 
[2, -2, 0, 2]: 1, 2, -3, -6, 30, 6, -301, 432, 2642, -9610, -15321, 
[2, -2, 0, 3]: 1, 2, -3, -10, 38, 88, -611, -760, 10676, 2410, -191898, 
[2, -2, 1, 0]: 1, 2, -1, -2, 3, 0, -4, 4, 1, -6, 5, 
[2, -2, 1, 1]: 1, 2, -1, -6, 7, 26, -54, -118, 413, 472, -3078, 
[2, -2, 1, 2]: 1, 2, -1, -10, 7, 88, -68, -946, 767, 11298, -9425, 
[2, -2, 1, 3]: 1, 2, -1, -14, 3, 182, 74, -2864, -3277, 48954, 96998, 
[2, -2, 2, 0]: 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 
[2, -2, 2, 1]: 1, 2, 1, -4, -8, 6, 42, 26, -170, -356, 409, 
[2, -2, 2, 2]: 1, 2, 1, -8, -20, 32, 248, 142, -2430, -6442, 15818, 
[2, -2, 2, 3]: 1, 2, 1, -12, -36, 74, 718, 616, -10868, -40232, 96705, 
[2, -2, 3, 0]: 1, 2, 3, 8, 25, 84, 297, 1088, 4093, 15718, 61362, 
[2, -2, 3, 1]: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
[2, -2, 3, 2]: 1, 2, 3, 0, -19, -68, -91, 286, 2055, 5396, 72, 
[2, -2, 3, 3]: 1, 2, 3, -4, -47, -142, 83, 2698, 11139, 3726, -193677, 
[2, -1, 0, 0]: 1, 2, -1, 0, 1, -2, 3, -4, 5, -6, 7, 
[2, -1, 0, 1]: 1, 2, -1, -2, 5, -2, -12, 26, -2, -90, 163, 
[2, -1, 0, 2]: 1, 2, -1, -4, 7, 12, -47, -24, 306, -146, -1865, 
[2, -1, 0, 3]: 1, 2, -1, -6, 7, 38, -64, -304, 663, 2710, -7328, 
[2, -1, 1, 0]: 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 
[2, -1, 1, 1]: 1, 2, 1, -2, -2, 4, 5, -10, -14, 28, 42, 
[2, -1, 1, 2]: 1, 2, 1, -4, -6, 14, 40, -50, -273, 112, 1848, 
[2, -1, 1, 3]: 1, 2, 1, -6, -12, 28, 133, -72, -1365, -1204, 12483, 
[2, -1, 2, 0]: 1, 2, 3, 6, 13, 30, 72, 178, 450, 1158, 3023, 
[2, -1, 2, 1]: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
[2, -1, 2, 2]: 1, 2, 3, 2, -5, -20, -28, 26, 219, 458, 11, 
[2, -1, 2, 3]: 1, 2, 3, 0, -17, -50, -15, 406, 1500, 962, -12628, 
[2, -1, 3, 0]: 1, 2, 5, 18, 72, 310, 1399, 6532, 31287, 152876, 759034, 
[2, -1, 3, 1]: 1, 2, 5, 16, 58, 226, 924, 3910, 16979, 75232, 338776, 
[2, -1, 3, 2]: 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 
[2, -1, 3, 3]: 1, 2, 5, 12, 24, 26, -78, -680, -2992, -9624, -21671, 
[2, 0, 0, 0]: 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 
[2, 0, 0, 1]: 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 
[2, 0, 0, 2]: 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 
[2, 0, 0, 3]: 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 
[2, 0, 1, 0]: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
[2, 0, 1, 1]: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
[2, 0, 1, 2]: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
[2, 0, 1, 3]: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
[2, 0, 2, 0]: 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 
[2, 0, 2, 1]: 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 
[2, 0, 2, 2]: 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 
[2, 0, 2, 3]: 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 
[2, 0, 3, 0]: 1, 2, 7, 30, 143, 728, 3876, 21318, 120175, 690690, 4032015, 
[2, 0, 3, 1]: 1, 2, 7, 30, 143, 728, 3876, 21318, 120175, 690690, 4032015, 
[2, 0, 3, 2]: 1, 2, 7, 30, 143, 728, 3876, 21318, 120175, 690690, 4032015, 
[2, 0, 3, 3]: 1, 2, 7, 30, 143, 728, 3876, 21318, 120175, 690690, 4032015, 
[2, 1, 0, 0]: 1, 2, 3, 2, 1, 0, 0, 0, 0, 0, 0, 
[2, 1, 0, 1]: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
[2, 1, 0, 2]: 1, 2, 3, 6, 11, 22, 44, 90, 187, 392, 832, 
[2, 1, 0, 3]: 1, 2, 3, 8, 19, 50, 137, 380, 1088, 3152, 9270, 
[2, 1, 1, 0]: 1, 2, 5, 10, 20, 38, 71, 130, 235, 420, 744, 
[2, 1, 1, 1]: 1, 2, 5, 12, 30, 76, 196, 512, 1353, 3610, 9713, 
[2, 1, 1, 2]: 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 
[2, 1, 1, 3]: 1, 2, 5, 16, 56, 208, 806, 3220, 13168, 54852, 231924, 
[2, 1, 2, 0]: 1, 2, 7, 24, 89, 342, 1355, 5492, 22669, 94962, 402703, 
[2, 1, 2, 1]: 1, 2, 7, 26, 105, 444, 1944, 8734, 40040, 186550, 880750, 
[2, 1, 2, 2]: 1, 2, 7, 28, 123, 572, 2769, 13806, 70414, 365636, 1926505, 
[2, 1, 2, 3]: 1, 2, 7, 30, 143, 728, 3876, 21318, 120175, 690690, 4032015, 
[2, 1, 3, 0]: 1, 2, 9, 44, 240, 1390, 8404, 52426, 334964, 2180928, 14418123, 
[2, 1, 3, 1]: 1, 2, 9, 46, 262, 1588, 10053, 65686, 439658, 2999116, 20774154, 
[2, 1, 3, 2]: 1, 2, 9, 48, 286, 1820, 12116, 83334, 587537, 4223582, 30840355, 
[2, 1, 3, 3]: 1, 2, 9, 50, 312, 2088, 14649, 106326, 791775, 6015360, 46441441, 
[2, 2, 0, 0]: 1, 2, 5, 6, 6, 4, 1, 0, 0, 0, 0, 
[2, 2, 0, 1]: 1, 2, 5, 10, 22, 46, 99, 212, 458, 994, 2167, 
[2, 2, 0, 2]: 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 
[2, 2, 0, 3]: 1, 2, 5, 18, 66, 266, 1107, 4770, 21032, 94516, 431247, 
[2, 2, 1, 0]: 1, 2, 7, 18, 47, 118, 290, 702, 1677, 3966, 9300, 
[2, 2, 1, 1]: 1, 2, 7, 22, 75, 260, 924, 3340, 12249, 45460, 170423, 
[2, 2, 1, 2]: 1, 2, 7, 26, 107, 462, 2074, 9572, 45147, 216638, 1054254, 
[2, 2, 1, 3]: 1, 2, 7, 30, 143, 728, 3876, 21318, 120175, 690690, 4032015, 
[2, 2, 2, 0]: 1, 2, 9, 36, 156, 698, 3210, 15080, 72060, 349184, 1711869, 
[2, 2, 2, 1]: 1, 2, 9, 40, 196, 1004, 5328, 29018, 161282, 911092, 5215808, 
[2, 2, 2, 2]: 1, 2, 9, 44, 240, 1386, 8346, 51802, 329086, 2129330, 13984095, 
[2, 2, 2, 3]: 1, 2, 9, 48, 288, 1848, 12420, 86300, 614968, 4469592, 33004920, 
[2, 2, 3, 0]: 1, 2, 11, 60, 365, 2350, 15767, 109048, 771993, 5567066, 40751267, 
[2, 2, 3, 1]: 1, 2, 11, 64, 417, 2884, 20817, 155004, 1181909, 9182454, 72428834, 
[2, 2, 3, 2]: 1, 2, 11, 68, 473, 3510, 27251, 218586, 1797267, 15067316, 128307685, 
[2, 2, 3, 3]: 1, 2, 11, 72, 533, 4232, 35245, 303754, 2686335, 24241170, 222317306, 
[2, 3, 0, 0]: 1, 2, 7, 12, 17, 20, 15, 6, 1, 0, 0, 
[2, 3, 0, 1]: 1, 2, 7, 18, 53, 152, 444, 1316, 3924, 11826, 35880, 
[2, 3, 0, 2]: 1, 2, 7, 24, 95, 386, 1641, 7150, 31844, 144216, 662228, 
[2, 3, 0, 3]: 1, 2, 7, 30, 143, 728, 3876, 21318, 120175, 690690, 4032015, 
[2, 3, 1, 0]: 1, 2, 9, 28, 88, 270, 808, 2386, 6960, 20104, 57607, 
[2, 3, 1, 1]: 1, 2, 9, 34, 142, 606, 2653, 11844, 53694, 246574, 1144517, 
[2, 3, 1, 2]: 1, 2, 9, 40, 202, 1068, 5884, 33356, 193365, 1140940, 6829601, 
[2, 3, 1, 3]: 1, 2, 9, 46, 268, 1662, 10801, 72538, 499533, 3508174, 25029772, 
[2, 3, 2, 0]: 1, 2, 11, 50, 245, 1240, 6432, 34046, 183148, 998468, 5504538, 
[2, 3, 2, 1]: 1, 2, 11, 56, 317, 1876, 11499, 72352, 464585, 3032198, 20056036, 
[2, 3, 2, 2]: 1, 2, 11, 62, 395, 2662, 18720, 135738, 1007607, 7619456, 58488028, 
[2, 3, 2, 3]: 1, 2, 11, 68, 479, 3604, 28425, 231842, 1939666, 16553738, 143550681, 
[2, 3, 3, 0]: 1, 2, 13, 78, 520, 3664, 26859, 202808, 1566693, 12323982, 98381841, 
[2, 3, 3, 1]: 1, 2, 13, 84, 610, 4696, 37704, 312178, 2646221, 22851324, 200319059, 
[2, 3, 3, 2]: 1, 2, 13, 90, 706, 5902, 51621, 466446, 4320334, 40800078, 391376349, 
[2, 3, 3, 3]: 1, 2, 13, 96, 808, 7288, 68970, 675488, 6789180, 69629304, 725784648, 
[3, -3, 0, 0]: 1, 3, -6, 1, 24, -78, 150, -177, -9, 762, -2739, 
[3, -3, 0, 1]: 1, 3, -6, -8, 69, -114, -345, 2205, -3156, -14163, 81039, 
[3, -3, 0, 2]: 1, 3, -6, -17, 105, 12, -1632, 3615, 19455, -112581, -79626, 
[3, -3, 0, 3]: 1, 3, -6, -26, 132, 291, -3261, -1311, 81513, -107031, -1960104, 
[3, -3, 1, 0]: 1, 3, -3, -8, 21, 0, -74, 114, 66, -476, 564, 
[3, -3, 1, 1]: 1, 3, -3, -17, 39, 108, -497, -456, 5778, -2945, -59730, 
[3, -3, 1, 2]: 1, 3, -3, -26, 48, 342, -956, -5130, 20373, 80410, -445584, 
[3, -3, 1, 3]: 1, 3, -3, -35, 48, 693, -1046, -16635, 26328, 442396, -720327, 
[3, -3, 2, 0]: 1, 3, 0, -8, -3, 18, 17, -30, -63, 17, 171, 
[3, -3, 2, 1]: 1, 3, 0, -17, -12, 126, 188, -1005, -2439, 8078, 29691, 
[3, -3, 2, 2]: 1, 3, 0, -26, -30, 324, 854, -4284, -20223, 51995, 445533, 
[3, -3, 2, 3]: 1, 3, 0, -35, -57, 603, 2375, -10281, -81054, 120797, 2510982, 
[3, -3, 3, 0]: 1, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0, 
[3, -3, 3, 1]: 1, 3, 3, -8, -36, -36, 162, 699, 642, -3846, -16179, 
[3, -3, 3, 2]: 1, 3, 3, -17, -81, -18, 1125, 3882, -5916, -86721, -187638, 
[3, -3, 3, 3]: 1, 3, 3, -26, -135, 45, 3204, 11124, -39420, -458442, -750465, 
[3, -2, 0, 0]: 1, 3, -3, -2, 12, -24, 31, -21, -24, 129, -327, 
[3, -2, 0, 1]: 1, 3, -3, -8, 30, -15, -155, 456, -18, -3194, 8058, 
[3, -2, 0, 2]: 1, 3, -3, -14, 42, 66, -527, 138, 5802, -11548, -51471, 
[3, -2, 0, 3]: 1, 3, -3, -20, 48, 213, -881, -2487, 16938, 26352, -329754, 
[3, -2, 1, 0]: 1, 3, 0, -5, 3, 6, -10, 0, 15, -15, -6, 
[3, -2, 1, 1]: 1, 3, 0, -11, 3, 57, -46, -321, 489, 1798, -4518, 
[3, -2, 1, 2]: 1, 3, 0, -17, -3, 156, 44, -1713, -597, 20723, 8160, 
[3, -2, 1, 3]: 1, 3, 0, -23, -15, 297, 434, -4530, -10833, 73965, 259218, 
[3, -2, 2, 0]: 1, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0, 
[3, -2, 2, 1]: 1, 3, 3, -5, -18, -3, 78, 120, -228, -935, -75, 
[3, -2, 2, 2]: 1, 3, 3, -11, -42, 18, 444, 681, -3570, -15106, 11850, 
[3, -2, 2, 3]: 1, 3, 3, -17, -72, 57, 1242, 2271, -15828, -84552, 70491, 
[3, -2, 3, 0]: 1, 3, 6, 16, 51, 174, 622, 2298, 8703, 33603, 131772, 
[3, -2, 3, 1]: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 
[3, -2, 3, 2]: 1, 3, 6, 4, -27, -132, -266, 219, 3597, 12512, 12840, 
[3, -2, 3, 3]: 1, 3, 6, -2, -75, -291, -146, 4161, 22167, 29607, -280038, 
[3, -1, 0, 0]: 1, 3, 0, -2, 3, -3, 2, 0, -3, 7, -12, 
[3, -1, 0, 1]: 1, 3, 0, -5, 6, 6, -28, 24, 60, -189, 96, 
[3, -1, 0, 2]: 1, 3, 0, -8, 6, 33, -61, -135, 501, 383, -3702, 
[3, -1, 0, 3]: 1, 3, 0, -11, 3, 75, -43, -633, 564, 5929, -7266, 
[3, -1, 1, 0]: 1, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0, 
[3, -1, 1, 1]: 1, 3, 3, -2, -6, 3, 15, -6, -42, 14, 126, 
[3, -1, 1, 2]: 1, 3, 3, -5, -15, 12, 87, -3, -525, -380, 3132, 
[3, -1, 1, 3]: 1, 3, 3, -8, -27, 24, 255, 132, -2268, -4578, 17118, 
[3, -1, 2, 0]: 1, 3, 6, 13, 30, 72, 178, 450, 1158, 3023, 7986, 
[3, -1, 2, 1]: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 
[3, -1, 2, 2]: 1, 3, 6, 7, -3, -36, -80, -33, 339, 1131, 1218, 
[3, -1, 2, 3]: 1, 3, 6, 4, -24, -102, -122, 537, 3006, 4805, -15378, 
[3, -1, 3, 0]: 1, 3, 9, 34, 141, 621, 2849, 13467, 65127, 320686, 1602294, 
[3, -1, 3, 1]: 1, 3, 9, 31, 117, 468, 1949, 8361, 36693, 163956, 743388, 
[3, -1, 3, 2]: 1, 3, 9, 28, 90, 297, 1001, 3432, 11934, 41990, 149226, 
[3, -1, 3, 3]: 1, 3, 9, 25, 60, 105, 14, -963, -5580, -21428, -60951, 
[3, 0, 0, 0]: 1, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0, 
[3, 0, 0, 1]: 1, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0, 
[3, 0, 0, 2]: 1, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0, 
[3, 0, 0, 3]: 1, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0, 
[3, 0, 1, 0]: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 
[3, 0, 1, 1]: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 
[3, 0, 1, 2]: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 
[3, 0, 1, 3]: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 
[3, 0, 2, 0]: 1, 3, 9, 28, 90, 297, 1001, 3432, 11934, 41990, 149226, 
[3, 0, 2, 1]: 1, 3, 9, 28, 90, 297, 1001, 3432, 11934, 41990, 149226, 
[3, 0, 2, 2]: 1, 3, 9, 28, 90, 297, 1001, 3432, 11934, 41990, 149226, 
[3, 0, 2, 3]: 1, 3, 9, 28, 90, 297, 1001, 3432, 11934, 41990, 149226, 
[3, 0, 3, 0]: 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 8414640, 
[3, 0, 3, 1]: 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 8414640, 
[3, 0, 3, 2]: 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 8414640, 
[3, 0, 3, 3]: 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 8414640, 
[3, 1, 0, 0]: 1, 3, 6, 7, 6, 3, 1, 0, 0, 0, 0, 
[3, 1, 0, 1]: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 
[3, 1, 0, 2]: 1, 3, 6, 13, 27, 57, 121, 258, 555, 1199, 2607, 
[3, 1, 0, 3]: 1, 3, 6, 16, 42, 114, 322, 918, 2673, 7875, 23457, 
[3, 1, 1, 0]: 1, 3, 9, 22, 51, 111, 233, 474, 942, 1836, 3522, 
[3, 1, 1, 1]: 1, 3, 9, 25, 69, 189, 518, 1422, 3915, 10813, 29964, 
[3, 1, 1, 2]: 1, 3, 9, 28, 90, 297, 1001, 3432, 11934, 41990, 149226, 
[3, 1, 1, 3]: 1, 3, 9, 31, 114, 438, 1739, 7077, 29364, 123756, 528324, 
[3, 1, 2, 0]: 1, 3, 12, 46, 183, 741, 3054, 12768, 54033, 231039, 996720, 
[3, 1, 2, 1]: 1, 3, 12, 49, 210, 927, 4191, 19305, 90285, 427570, 2046324, 
[3, 1, 2, 2]: 1, 3, 12, 52, 240, 1155, 5733, 29136, 150858, 792965, 4220337, 
[3, 1, 2, 3]: 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 8414640, 
[3, 1, 3, 0]: 1, 3, 15, 79, 450, 2685, 16585, 105147, 680349, 4474818, 29829888, 
[3, 1, 3, 1]: 1, 3, 15, 82, 486, 3027, 19543, 129606, 877650, 6043150, 42182454, 
[3, 1, 3, 2]: 1, 3, 15, 85, 525, 3423, 23188, 161595, 1151040, 8342675, 61329645, 
[3, 1, 3, 3]: 1, 3, 15, 88, 567, 3876, 27607, 202653, 1522365, 11647038, 90435804, 
[3, 2, 0, 0]: 1, 3, 9, 16, 24, 27, 23, 15, 6, 1, 0, 
[3, 2, 0, 1]: 1, 3, 9, 22, 54, 126, 293, 672, 1536, 3498, 7953, 
[3, 2, 0, 2]: 1, 3, 9, 28, 90, 297, 1001, 3432, 11934, 41990, 149226, 
[3, 2, 0, 3]: 1, 3, 9, 34, 132, 546, 2327, 10191, 45534, 206788, 951723, 
[3, 2, 1, 0]: 1, 3, 12, 37, 111, 315, 864, 2307, 6027, 15471, 39132, 
[3, 2, 1, 1]: 1, 3, 12, 43, 159, 588, 2196, 8262, 31311, 119438, 458304, 
[3, 2, 1, 2]: 1, 3, 12, 49, 213, 957, 4422, 20868, 100173, 487597, 2401080, 
[3, 2, 1, 3]: 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 8414640, 
[3, 2, 2, 0]: 1, 3, 15, 67, 312, 1473, 7060, 34269, 168156, 832904, 4159233, 
[3, 2, 2, 1]: 1, 3, 15, 73, 378, 2016, 11026, 61479, 348192, 1997515, 11583354, 
[3, 2, 2, 2]: 1, 3, 15, 79, 450, 2679, 16492, 104100, 670140, 4382730, 29037987, 
[3, 2, 2, 3]: 1, 3, 15, 85, 528, 3468, 23698, 166728, 1199646, 8786768, 65296296, 
[3, 2, 3, 0]: 1, 3, 18, 106, 675, 4485, 30788, 216660, 1554789, 11335111, 83720982, 
[3, 2, 3, 1]: 1, 3, 18, 112, 759, 5394, 39710, 300144, 2315673, 18162129, 144379578, 
[3, 2, 3, 2]: 1, 3, 18, 118, 849, 6447, 50888, 413307, 3431577, 28994306, 248493570, 
[3, 2, 3, 3]: 1, 3, 18, 124, 945, 7650, 64592, 562419, 5013645, 45530725, 419735784, 
[3, 3, 0, 0]: 1, 3, 12, 28, 57, 96, 129, 144, 129, 84, 36, 
[3, 3, 0, 1]: 1, 3, 12, 37, 120, 375, 1173, 3666, 11448, 35835, 112347, 
[3, 3, 0, 2]: 1, 3, 12, 46, 192, 816, 3576, 15963, 72456, 333252, 1549983, 
[3, 3, 0, 3]: 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, 1430715, 8414640, 
[3, 3, 1, 0]: 1, 3, 15, 55, 198, 681, 2263, 7341, 23331, 72928, 224814, 
[3, 3, 1, 1]: 1, 3, 15, 64, 288, 1302, 5962, 27585, 128778, 606001, 2871660, 
[3, 3, 1, 2]: 1, 3, 15, 73, 387, 2121, 11992, 69348, 408375, 2440438, 14762679, 
[3, 3, 1, 3]: 1, 3, 15, 82, 495, 3147, 20812, 141621, 985287, 6976369, 50108232, 
[3, 3, 2, 0]: 1, 3, 18, 91, 480, 2565, 13883, 76017, 420381, 2344979, 13180419, 
[3, 3, 2, 1]: 1, 3, 18, 100, 597, 3672, 23171, 149127, 975096, 6459440, 43258380, 
[3, 3, 2, 2]: 1, 3, 18, 109, 723, 5013, 35987, 265068, 1992087, 15214877, 117754593, 
[3, 3, 2, 3]: 1, 3, 18, 118, 858, 6597, 52835, 435918, 3679722, 31628666, 275880690, 
[3, 3, 3, 0]: 1, 3, 21, 136, 951, 6924, 51990, 399801, 3133071, 24931833, 200929671, 
[3, 3, 3, 1]: 1, 3, 21, 145, 1095, 8661, 70926, 596139, 5113356, 44579502, 393877020, 
[3, 3, 3, 2]: 1, 3, 21, 154, 1248, 10668, 94812, 867132, 8107761, 77150073, 744682455, 
[3, 3, 3, 3]: 1, 3, 21, 163, 1410, 12954, 124197, 1228269, 12438504, 128338224, 1344328020, 

2024年11月24日日曜日

241124

PARI


A135539

Sum_{j>=1} x^(k*j)/(1 - x^j) = Sum_{j>=k} x^j/(1 - x^j) を確認してみた。

N=30;

a(k) = sum(j=1, N, x^(k*j)/(1-x^j) + x*O(x^N));
b(k) = sum(j=k, N, x^j    /(1-x^j) + x*O(x^N));
for(k=1, 10, if(a(k)==b(k), print(k, " ", Vec(a(k)))))

出力結果
1 [1, 2, 2, 3, 2, 4, 2, 4, 3, 4, 2, 6, 2, 4, 4, 5, 2, 6, 2, 6, 4, 4, 2, 8, 3, 4, 4, 6, 2, 8]
2 [1, 1, 2, 1, 3, 1, 3, 2, 3, 1, 5, 1, 3, 3, 4, 1, 5, 1, 5, 3, 3, 1, 7, 2, 3, 3, 5, 1, 7]
3 [1, 1, 1, 2, 1, 2, 2, 2, 1, 4, 1, 2, 3, 3, 1, 4, 1, 4, 3, 2, 1, 6, 2, 2, 3, 4, 1, 6]
4 [1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 2, 2, 3, 1, 3, 1, 4, 2, 2, 1, 5, 2, 2, 2, 4, 1, 5]
5 [1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 3, 1, 3, 2, 2, 1, 4, 2, 2, 2, 3, 1, 5]
6 [1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 2, 2, 1, 4, 1, 2, 2, 3, 1, 4]
7 [1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 1, 3, 1, 2, 2, 3, 1, 3]
8 [1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 2, 2, 1, 3]
9 [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 1, 3]
10 [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3]

2024年10月20日日曜日

241020

PARI


A377145等

出力してみた。

N=10;

a(n, k) = sum(j=0, n, binomial(j+k, k)*binomial(j, n-j)^2);
b(n) = sum(k=0, N, a(k, n)*x^k + x*O(x^N));

a089627(n, k) = n!/((n-2*k)!*k!^2);
c(n) = sum(k=0, n\2, a089627(n, k)*(1-x-x^2)^(n-2*k)*x^(3*k))/((1-x-x^2)^2-4*x^3 + x*O(x^N))^(n+1/2);
for(n=0, 10, if(b(n)==c(n), print(n, " ", Vec(b(n)))));

出力結果
0 [1, 1, 2, 5, 11, 26, 63, 153, 376, 931, 2317]
1 [1, 2, 5, 16, 44, 122, 341, 940, 2581, 7064, 19258]
2 [1, 3, 9, 34, 111, 351, 1103, 3384, 10224, 30536, 90222]
3 [1, 4, 14, 60, 225, 796, 2764, 9304, 30580, 98700, 313422]
4 [1, 5, 20, 95, 400, 1561, 5915, 21610, 76585, 265075, 898622]
5 [1, 6, 27, 140, 651, 2772, 11354, 44640, 169371, 624742, 2248575]
6 [1, 7, 35, 196, 994, 4578, 20118, 84540, 341397, 1335103, 5078227]
7 [1, 8, 44, 264, 1446, 7152, 33516, 149688, 640233, 2642992, 10582220]
8 [1, 9, 54, 345, 2025, 10692, 53163, 251163, 1133055, 4919200, 20662785]
9 [1, 10, 65, 440, 2750, 15422, 81015, 403260, 1911910, 8701550, 38231765]
10 [1, 11, 77, 550, 3641, 21593, 119405, 624052, 3099811, 14747733, 67602249]

2024年9月18日水曜日

240918

PARI


(1/x) * Series_Reversion( x * f(x) ).

a(n) = (1/(n+1)) * [x^n] (1/f(x))^(n+1) となることを確認する。

N=20;
x='x+O('x^(N+2));

f = 1/(1 + 5*x + x^2);
a = sum(k=0, N, polcoef(1/f^(k+1), k)/(k+1) * x^k);
b = serreverse(x*f)/x;
print(Vec(a));
print(Vec(b));
print(Vec(a-b));

f = 1 + 5*x + x^2;
a = sum(k=0, N, polcoef(1/f^(k+1), k)/(k+1) * x^k);
b = serreverse(x*f)/x;
print(Vec(a));
print(Vec(b));
print(Vec(a-b));

f = 1/(3 - 2*exp(x));
a = serlaplace(sum(k=0, N, polcoef(1/f^(k+1), k)/(k+1) * x^k));
b = serlaplace(serreverse(x*f)/x);
print(Vec(a));
print(Vec(b));
print(Vec(a-b));

f = 3 - 2*exp(x);
a = serlaplace(sum(k=0, N, polcoef(1/f^(k+1), k)/(k+1) * x^k));
b = serlaplace(serreverse(x*f)/x);
print(Vec(a));
print(Vec(b));
print(Vec(a-b));

出力結果
[1, 5, 26, 140, 777, 4425, 25755, 152675, 919139, 5606255, 34578292, 215322310, 1351978807, 8550394455, 54419811354, 348309105300, 2240486766555, 14476490777175, 93914850905862, 611489638708140, 3994697746533171, 0]
[1, 5, 26, 140, 777, 4425, 25755, 152675, 919139, 5606255, 34578292, 215322310, 1351978807, 8550394455, 54419811354, 348309105300, 2240486766555, 14476490777175, 93914850905862, 611489638708140, 3994697746533171]
[]
[1, -5, 49, -600, 8228, -120890, 1860738, -29616675, 483483055, -8050547505, 136201191477, -2334603084060, 40456777529028, -707614530573800, 12475631038479848, -221479557759651840, 3955846194794651388, -71035215358997870750, 1281683885259534013950, -23224445624372453734350, 422457775863392772285090, 0]
[1, -5, 49, -600, 8228, -120890, 1860738, -29616675, 483483055, -8050547505, 136201191477, -2334603084060, 40456777529028, -707614530573800, 12475631038479848, -221479557759651840, 3955846194794651388, -71035215358997870750, 1281683885259534013950, -23224445624372453734350, 422457775863392772285090]
[]
[1, -2, 6, -14, -82, 2058, -22778, 55186, 4737630, -141417830, 1940770358, 18532189410, -2031211536242, 63333969461098, -624072759994266, -46503997775007182, 3129486110236404926, -90436659990999596742, -559947921342589721450, 214981434079884273561730, -12114419920158647173081362, 0]
[1, -2, 6, -14, -82, 2058, -22778, 55186, 4737630, -141417830, 1940770358, 18532189410, -2031211536242, 63333969461098, -624072759994266, -46503997775007182, 3129486110236404926, -90436659990999596742, -559947921342589721450, 214981434079884273561730, -12114419920158647173081362]
[]
[1, 2, 18, 302, 7562, 253542, 10685794, 543309230, 32378850042, 2214215333750, 170939286647570, 14707184259036414, 1395561779648175274, 144795755972202587462, 16308198003201872476866, 1981633767850818093910094, 258406311809937562215099482, 35994776359231593721760238102, 5334228760604574619939352424562, 837995152675419667859461838034590, 139110781237167610980642890783413770, 0]
[1, 2, 18, 302, 7562, 253542, 10685794, 543309230, 32378850042, 2214215333750, 170939286647570, 14707184259036414, 1395561779648175274, 144795755972202587462, 16308198003201872476866, 1981633767850818093910094, 258406311809937562215099482, 35994776359231593721760238102, 5334228760604574619939352424562, 837995152675419667859461838034590, 139110781237167610980642890783413770]
[]

2024年8月7日水曜日

240807

PARI


A144088

出力してみた。
ついでにRow sums も計算した。

T(n, k) = n!/k!*sum(j=0, n-k, binomial(j, n-k-j)/(n-k-j)!);
for(n=0, 10, for(k=0, n, print1(T(n, k),", ")); print)

print

for(n=0, 30, print1(sum(k=0, n, T(n, k)),", "))

出力結果
1, 
1, 1, 
4, 2, 1, 
18, 12, 3, 1, 
108, 72, 24, 4, 1, 
780, 540, 180, 40, 5, 1, 
6600, 4680, 1620, 360, 60, 6, 1, 
63840, 46200, 16380, 3780, 630, 84, 7, 1, 
693840, 510720, 184800, 43680, 7560, 1008, 112, 8, 1, 
8361360, 6244560, 2298240, 554400, 98280, 13608, 1512, 144, 9, 1, 
110557440, 83613600, 31222800, 7660800, 1386000, 196560, 22680, 2160, 180, 10, 1, 

1, 2, 7, 34, 209, 1546, 13327, 130922, 1441729, 17572114, 234662231, 3405357682, 53334454417, 896324308634, 16083557845279, 306827170866106, 6199668952527617, 132240988644215842, 2968971263911288999, 69974827707903049154, 1727194482044146637521, 44552237162692939114282, 1198605668577020653881647, 33572577967799567547243274, 977421343777135316364285889, 29533262279404214911002168626, 924841298668309602644434087927, 29976944827211469262961974756882, 1004499603594644578398078136286609, 34759052263955593644926343695227834, 1240758969214239528262796909096631871, 

2024年7月20日土曜日

240720

Ruby


A292105

正n 角形において、ちょうどk 本の対角線が交わる点の数を出力してみた。

def d(n, k)
  n % k == 0 ? 1 : 0
end

def a2(n)
  s  = (n ** 3 - 6 * n * n + 11 * n - 6) / 24r
  s += (- 5 * n * n + 46 * n - 72) / 16r * d(n, 2)
  s -= 9 / 4r * d(n, 4)
  s += (-19 * n + 110) / 2r * d(n, 6)
  s +=  54 * d(n, 12)
  s +=  84 * d(n, 18)
  s +=  50 * d(n, 24)
  s -=  24 * d(n, 30)
  s -= 100 * d(n, 42)
  s -= 432 * d(n, 60)
  s -= 204 * d(n, 84)
  s -= 144 * d(n, 90)
  s -= 204 * d(n, 120)
  s -= 144 * d(n, 210)
  (n * s).to_i
end

def a3(n)
  s  = (5 * n * n - 48 * n + 76) / 48r * d(n, 2)
  s += 3 / 4r * d(n, 4)
  s += (7 * n - 38) / 6r * d(n, 6)
  s -=   8 * d(n, 12)
  s -=  20 * d(n, 18)
  s -=  16 * d(n, 24)
  s -=  19 * d(n, 30)
  s +=   8 * d(n, 42)
  s +=  68 * d(n, 60)
  s +=  60 * d(n, 84)
  s +=  48 * d(n, 90)
  s +=  60 * d(n, 120)
  s +=  48 * d(n, 210)
  (n * s).to_i
end

def a4(n)
  s  = (7 * n - 42) / 12r * d(n, 6)
  s -= 5 / 2r * d(n, 12)
  s -=  4 * d(n, 18)
  s +=  3 * d(n, 24)
  s +=  6 * d(n, 42)
  s += 34 * d(n, 60)
  s -=  6 * d(n, 84)
  s -=  6 * d(n, 120)
  (n * s).to_i
end

def a5(n)
  s  = (n - 6) / 4r * d(n, 6)
  s -= 3 / 2r * d(n, 12)
  s -= 2 * d(n, 24)
  s += 4 * d(n, 42)
  s += 6 * d(n, 84)
  s += 6 * d(n, 120)
  (n * s).to_i
end

def a6(n)
  n * (4 * d(n, 30) - 4 * d(n, 60))
end

def a7(n)
  n * (d(n, 30) + 4 * d(n, 60))
end

def a(n, k)
  return a2(n) if k == 2
  return a3(n) if k == 3
  return a4(n) if k == 4
  return a5(n) if k == 5
  return a6(n) if k == 6
  return a7(n) if k == 7
end

def A(n)
  return [0] if n < 4
  return [0, a(n, 2)] if n % 2 == 1
  return [0] + (2..n / 2 - 1).map{|i| a(n, i)} + [1] if n / 2 < 9
  [0] + (2..7).map{|i| a(n, i)} + [0] * (n / 2 - 8) + [1]
end

n = 100
(1..n).each{|i|
  print i
  print ':'
  p A(i)
}

出力結果
1:[0]
2:[0]
3:[0]
4:[0, 1]
5:[0, 5]
6:[0, 12, 1]
7:[0, 35]
8:[0, 40, 8, 1]
9:[0, 126]
10:[0, 140, 20, 0, 1]
11:[0, 330]
12:[0, 228, 60, 12, 0, 1]
13:[0, 715]
14:[0, 644, 112, 0, 0, 0, 1]
15:[0, 1365]
16:[0, 1168, 208, 0, 0, 0, 0, 1]
17:[0, 2380]
18:[0, 1512, 216, 54, 54, 0, 0, 0, 1]
19:[0, 3876]
20:[0, 3360, 480, 0, 0, 0, 0, 0, 0, 1]
21:[0, 5985]
22:[0, 5280, 660, 0, 0, 0, 0, 0, 0, 0, 1]
23:[0, 8855]
24:[0, 6144, 864, 264, 24, 0, 0, 0, 0, 0, 0, 1]
25:[0, 12650]
26:[0, 11284, 1196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
27:[0, 17550]
28:[0, 15680, 1568, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
29:[0, 23751]
30:[0, 13800, 2250, 420, 180, 120, 30, 0, 0, 0, 0, 0, 0, 0, 1]
31:[0, 31465]
32:[0, 28448, 2464, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
33:[0, 40920]
34:[0, 37264, 2992, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
35:[0, 52360]
36:[0, 42444, 3924, 396, 216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
37:[0, 66045]
38:[0, 60648, 4332, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
39:[0, 82251]
40:[0, 75720, 5160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
41:[0, 101270]
42:[0, 75012, 8148, 1134, 546, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
43:[0, 123410]
44:[0, 114400, 7040, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
45:[0, 148995]
46:[0, 138644, 8096, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
47:[0, 178365]
48:[0, 152064, 10560, 1200, 336, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
49:[0, 211876]
50:[0, 198200, 10600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
51:[0, 249900]
52:[0, 234208, 12064, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
53:[0, 292825]
54:[0, 254988, 15552, 1296, 648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
55:[0, 341055]
56:[0, 321048, 15288, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
57:[0, 395010]
58:[0, 372708, 17052, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
59:[0, 455126]
60:[0, 375060, 25320, 3780, 720, 0, 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
61:[0, 521855]
62:[0, 494140, 21080, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
63:[0, 595665]
64:[0, 564800, 23360, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
65:[0, 677040]
66:[0, 605352, 30360, 2310, 990, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
67:[0, 766480]
68:[0, 728960, 28288, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
69:[0, 864501]
70:[0, 823480, 30940, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
71:[0, 971635]
72:[0, 894816, 36288, 2520, 936, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
73:[0, 1088430]
74:[0, 1039404, 36852, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
75:[0, 1215450]
76:[0, 1161888, 40128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
77:[0, 1353275]
78:[0, 1241760, 50076, 3276, 1404, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
79:[0, 1502501]
80:[0, 1439440, 47120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
81:[0, 1663740]
82:[0, 1595720, 50840, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
83:[0, 1837620]
84:[0, 1680588, 67620, 3612, 2352, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
85:[0, 2024785]
86:[0, 1945664, 58996, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
87:[0, 2225895]
88:[0, 2140600, 63448, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
89:[0, 2441626]
90:[0, 2270700, 77670, 4050, 1890, 360, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
91:[0, 2672670]
92:[0, 2574528, 72864, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
93:[0, 2919735]
94:[0, 2814924, 77832, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
95:[0, 3183545]
96:[0, 2999040, 91008, 5088, 1824, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
97:[0, 3464840]
98:[0, 3345328, 88592, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
99:[0, 3764376]
100:[0, 3636800, 94400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]

2024年6月22日土曜日

240622

PARI


Continued fraction for Pi^n(2)

Pi^3の連分数展開も興味深い。

for(n=1, 10, print([n, Pi^n, contfrac(Pi^n)]))

出力結果
[1, 3.1415926535897932384626433832795028842, [3, 7, 15, 1, 292, 1, 1, 1, 2, 1, 3, 1, 14, 2, 1, 1, 2, 2, 2, 2, 1, 84, 2, 1, 1, 15, 3, 13, 1, 4, 2, 6, 6]]
[2, 9.8696044010893586188344909998761511353, [9, 1, 6, 1, 2, 47, 1, 8, 1, 1, 2, 2, 1, 1, 8, 3, 1, 10, 5, 1, 3, 1, 2, 1, 1, 3, 15, 1, 1, 2, 2, 1, 3, 2, 7, 1, 9, 18]]
[3, 31.006276680299820175476315067101395202, [31, 159, 3, 7, 1, 13, 2, 1, 3, 1, 12, 2, 2, 4, 34, 2, 43, 3, 1, 3, 2, 1, 1, 5, 1, 1, 4, 1, 5, 4, 2, 4]]
[4, 97.409091034002437236440332688705111250, [97, 2, 2, 3, 1, 16539, 1, 6, 7, 6, 8, 6, 3, 9, 1, 1, 1, 18, 1, 4, 1, 13, 1, 2, 1, 127, 2]]
[5, 306.01968478528145326274131004343560648, [306, 50, 1, 4, 60, 1, 4, 23, 1, 2, 1, 1, 1, 17, 1, 5, 1, 1, 1, 2, 4, 10, 4, 1, 3, 2, 1, 36, 7, 1, 27]]
[6, 961.38919357530443703021944365241989886, [961, 2, 1, 1, 3, 9, 1, 5, 1, 3, 6, 1, 3, 1, 77, 11, 3, 1, 11, 14, 4, 4, 27, 5, 178, 6]]
[7, 3020.2932277767920675142064930720418319, [3020, 3, 2, 2, 3, 2, 10, 4, 1, 1, 2, 1, 3, 13, 58, 2, 50, 1, 2, 21, 1, 1, 2, 1, 14, 1, 182, 2, 1, 1, 2]]
[8, 9488.5310160705740071285755039067657967, [9488, 1, 1, 7, 1, 1, 3, 1, 1, 1, 4, 10, 13, 1, 1, 2, 3, 6, 1, 1, 1, 135, 1, 2, 2, 3, 1, 2, 1, 7, 3, 1, 1, 4, 2, 7, 1, 2]]
[9, 29809.099333446211666509402401239655364, [29809, 10, 14, 1, 9, 3, 1, 5, 8, 16, 3, 15, 7, 39, 3, 3, 1, 1, 2, 1, 3, 4, 1, 1, 7, 2, 1, 2, 1, 3]]
[10, 93648.047476083020973716690184919345635, [93648, 21, 15, 1, 4, 2, 1, 3, 2, 1, 4, 2, 74, 26, 5, 3, 1, 5, 17, 1, 2, 1, 1, 2, 1, 14, 2, 2, 8]]

2024年5月27日月曜日

240527

Ruby


GCD sum theorems

次の論文のTheorem 3 を確認してみた。
GCD sum theorems. Two Multivariable Cesaro Type Identities

class Array
  def gcd
    self.inject{|a, b| a.gcd(b)}
  end
end

def A(k, m, n)
  s = 0
  (1..n).to_a.repeated_permutation(k){|perm|
    s += (perm + [n]).gcd ** m
  }
  s
end

n = 15
# i>=j
(1..4).each{|i|
  (1..i).each{|j|
    a = (1..n).map{|k| A(i, j, k)}
    b = (1..n).map{|k| A(j, i, k)}
    p [i, j, a] if a == b
  }
}

出力結果
[1, 1, [1, 3, 5, 8, 9, 15, 13, 20, 21, 27, 21, 40, 25, 39, 45]]
[2, 1, [1, 5, 11, 22, 29, 55, 55, 92, 105, 145, 131, 242, 181, 275, 319]]
[2, 2, [1, 7, 17, 40, 49, 119, 97, 208, 225, 343, 241, 680, 337, 679, 833]]
[3, 1, [1, 9, 29, 74, 129, 261, 349, 596, 789, 1161, 1341, 2146, 2209, 3141, 3741]]
[3, 2, [1, 11, 35, 100, 149, 385, 391, 848, 1017, 1639, 1451, 3500, 2365, 4301, 5215]]
[3, 3, [1, 15, 53, 176, 249, 795, 685, 1856, 2133, 3735, 2661, 9328, 4393, 10275, 13197]]
[4, 1, [1, 17, 83, 274, 629, 1411, 2407, 4388, 6729, 10693, 14651, 22742, 28573, 40919, 52207]]
[4, 2, [1, 19, 89, 316, 649, 1691, 2449, 5104, 7281, 12331, 14761, 28124, 28729, 46531, 57761]]
[4, 3, [1, 23, 107, 424, 749, 2461, 2743, 7232, 9369, 17227, 15971, 45368, 30757, 63089, 80143]]
[4, 4, [1, 31, 161, 736, 1249, 4991, 4801, 15616, 19521, 38719, 29281, 118496, 57121, 148831, 201089]]

2024年4月14日日曜日

240414

PARI


Apéry numberの仲間たち

l>=7 のとき、closed formはまだ見つかっていないようだ。

h(n) = sum(k=1, n, 1/k);
a(n, l) = sum(k=0, n, binomial(n, k)^l*(1-l*k*(h(k)-h(n-k))));
for(l=1, 12, for(n=0, 10, print1(a(n, l), ", ")); print)

出力結果
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 
1, -2, 6, -20, 70, -252, 924, -3432, 12870, -48620, 184756, 
1, -3, 19, -147, 1251, -11253, 104959, -1004307, 9793891, -96918753, 970336269, 
1, -4, 48, -760, 13840, -273504, 5703096, -123519792, 2751843600, -62659854400, 1451780950048, 
1, -5, 109, -3317, 121501, -4954505, 216867925, -9981053045, 476860000285, -23451310381505, 1180189308268609, 
1, -6, 234, -13164, 936810, -76041756, 6739851636, -635746866264, 62819253878634, -6434646802174140, 678284981981948484, 
1, -7, 487, -49255, 6669751, -1053222757, 184786011019, -34916924925799, 6974335808409655, -1454249641139993257, 313810538382057898237, 
1, -8, 996, -177200, 45086980, -13631185008, 4662729892464, -1737911032294368, 690950882254608900, -288779498502632656640, 125605455885282444138496, 
1, -9, 2017, -620073, 294290001, -168314616009, 111074551176961, -80766140154871593, 63220243361206024657, -52382852763175965870009, 45422849668460020450930017, 
1, -10, 4062, -2125828, 1874792350, -2009033203260, 2538914209085100, -3571944365364382920, 5460901555410763324830, -8898003584839672562442700, 15258440639018489319278045812,