login
A376532
a(n) = (1/3^n) * Sum_{k=0..n^2} ( (binomial(n^2, k) * 2^k) (mod 3^n) ).
6
1, 3, 5, 7, 14, 16, 22, 28, 45, 48, 58, 73, 84, 96, 110, 130, 140, 169, 186, 200, 222, 236, 251, 307, 312, 321, 375, 381, 409, 458, 470, 488, 540, 566, 622, 644, 688, 725, 753, 798, 851, 869, 934, 974, 1000, 1046, 1139, 1174, 1197, 1232, 1308, 1338, 1402, 1451, 1507, 1580
OFFSET
1,2
LINKS
J. B. Roberts, On Binomial Coefficient Residues, Canadian Journal of Mathematics, Volume 9 1957, pp. 363 - 370.
EXAMPLE
The table of residues of coefficients of x^k in (1 + 2*x)^(n^2) modulo 3^n begins:
(1+2*x) (mod 3): [1, 2];
(1+2*x)^4 (mod 3^2): [1, 8, 6, 5, 7];
(1+2*x)^9 (mod 3^3): [1, 18, 9, 24, 18, 9, 3, 18, 9, 26];
(1+2*x)^16 (mod 3^4): [1, 32, 75, 25, 41, 51, 25, 2, 45, 8, 76, 24, 47, 4, 48, 56, 7];
(1+2*x)^25 (mod 3^5): [1, 50, 228, 175, 224, 132, 151, 56, 9, 223, 179, 201, 145, 47, 150, 139, 113, 234, 235, 122, 219, 139, 161, 42, 7, 20];
(1+2*x)^36 (mod 3^6): [1, 72, 333, 258, 612, 252, 417, 450, 711, 374, 270, 216, 414, 351, 216, 342, 351, 54, 600, 216, 513, 18, 621, 27, 90, 378, 432, 104, 171, 396, 525, 603, 234, 366, 279, 261, 136];
(1+2*x)^49 (mod 3^7): [1, 98, 330, 863, 166, 801, 84, 1032, 2088, 1771, 1046, 2049, 2042, 184, 9, 42, 1272, 693, 1006, 290, 870, 1778, 2140, 270, 2043, 1899, 2160, 683, 136, 1479, 1243, 536, 603, 2013, 1380, 558, 191, 16, 2082, 838, 419, 504, 192, 978, 1062, 722, 601, 1938, 1984, 929];
...
where a(n) equals the sum of row n divided by 3^n:
a(1) = (1 + 2)/3 = 1;
a(2) = (1 + 8 + 6 + 5 + 7)/3^2 = 3;
a(3) = (1 + 18 + 9 + 24 + 18 + 9 + 3 + 18 + 9 + 26)/3^3 = 5;
a(4) = (1 + 32 + 75 + 25 + 41 + 51 + 25 + 2 + 45 + 8 + 76 + 24 + 47 + 4 + 48 + 56 + 7)/3^4 = 7;
a(5) = (1 + 50 + 228 + 175 + 224 + 132 + 151 + 56 + 9 + 223 + 179 + 201 + 145 + 47 + 150 + 139 + 113 + 234 + 235 + 122 + 219 + 139 + 161 + 42 + 7 + 20)/3^5 = 14;
a(6) = (1 + 72 + 333 + 258 + 612 + 252 + 417 + 450 + 711 + 374 + 270 + 216 + 414 + 351 + 216 + 342 + 351 + 54 + 600 + 216 + 513 + 18 + 621 + 27 + 90 + 378 + 432 + 104 + 171 + 396 + 525 + 603 + 234 + 366 + 279 + 261 + 136)/3^6 = 16;
...
PROG
(PARI) {a(n) = sum(k=0, n^2, ( binomial(n^2, k) * 2^k ) % (3^n) )/3^n}
for(n=1, 60, print1(a(n), ", "))
(Python)
def A376532(n):
m, r, c, a, b, d = 3**n, n**2, 1, 2, n**2, 1
for k in range(1, r+1):
c += b//d*a%m
a = a*2%m
b *= r-k
d *= k+1
return c//m # Chai Wah Wu, Oct 07 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Oct 06 2024
STATUS
approved