This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A385826 #20 Jul 19 2025 18:03:19 %S A385826 1,2,4,8,16,18,22,2,4,8,16,32,36,44,4,8,16,32,43,58,67,8,16,32,36,72, %T A385826 60,92,16,32,43,72,81,120,121,18,36,58,60,120,100,144,22,44,67,92,121, %U A385826 144,169,2,4,8,16,32,36,44,4,8,16,32,64,72,88,8,16,32,64,86 %N A385826 a(n) = Sum_{k=0..n} (binomial(n, k) mod 7). %C A385826 Sum of n-th row of Pascal's triangle mod 7, A095142. %H A385826 Chai Wah Wu, <a href="/A385826/b385826.txt">Table of n, a(n) for n = 0..10000</a> %H A385826 Richard Garfield and Herbert S. Wilf, <a href="https://doi.org/10.1016/0022-314X(92)90078-4">The distribution of the binomial coefficients modulo p</a>, Journal of Number Theory, 41 (1) (1992), 1-5. %o A385826 (Python) %o A385826 from gmpy2 import digits %o A385826 from sympy.abc import x %o A385826 from sympy import Poly, rem %o A385826 def A385826(n): %o A385826 k = (1,3,2,6,4,5) %o A385826 s = digits(n,7) %o A385826 t = [s.count(str(i)) for i in range(1,7)] %o A385826 G = 2**t[0]*(2*x+2)**t[2]*(x**2+2)**t[1]*(3*x**3+4)**t[5]*(2*x**4+x**3+2)**t[3]*(2*x**5+2*x+2)**t[4] %o A385826 c = Poly(rem(G,x**6-1),x).all_coeffs()[::-1] %o A385826 return int(sum(k[i]*c[i] for i in range(len(c)) if c[i])) %Y A385826 Cf. A001316, A051638, A384715, A385285, A385741, A385825. %K A385826 nonn %O A385826 0,2 %A A385826 _Chai Wah Wu_, Jul 09 2025