A385828 a(n) = Sum_{k=0..n} (binomial(n, k) mod 11).
1, 2, 4, 8, 16, 32, 31, 40, 36, 50, 56, 2, 4, 8, 16, 32, 64, 62, 80, 72, 100, 112, 4, 8, 16, 32, 53, 106, 91, 116, 100, 156, 169, 8, 16, 32, 64, 62, 124, 116, 188, 134, 224, 228, 16, 32, 53, 62, 91, 182, 144, 222, 202, 272, 291, 32, 64, 106, 124, 182, 188, 244
Offset: 0
Keywords
Links
- Chai Wah Wu, Table of n, a(n) for n = 0..10000
- Richard Garfield and Herbert S. Wilf, The distribution of the binomial coefficients modulo p, Journal of Number Theory, 41 (1) (1992), 1-5.
Programs
-
Python
from gmpy2 import digits from sympy.abc import x from sympy import Poly, rem def A385828(n): s = digits(n,11) t = tuple(s.count(digits(i,11)) for i in range(1,11)) G = 2**t[0]*(x+2)**t[1]*(5*x**5+6)**t[9]*(2*x**8+2)**t[2]*(2*x**5+2*x**4+2)**t[4]*(x**9+2*x**2+2)**t[3]*(2*x**7+2*x**5+2*x+2)**t[6]*(2*x**9+2*x**3+x**2+4)**t[7]*(2*x**9+x**6+2*x**2+2)**t[5]*(2*x**8+2*x**7+2*x**6+2*x**4+2)**t[8] c = Poly(rem(G,x**10-1),x).all_coeffs()[::-1] return int(sum(pow(2,i,11)*c[i] for i in range(len(c)) if c[i]))
Comments