cp's OEIS Frontend

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.

A385825 a(n) = Sum_{k=0..n} (binomial(n, k) mod 5).

Original entry on oeis.org

1, 2, 4, 8, 11, 2, 4, 8, 16, 22, 4, 8, 16, 22, 34, 8, 16, 22, 44, 48, 11, 22, 34, 48, 61, 2, 4, 8, 16, 22, 4, 8, 16, 32, 44, 8, 16, 32, 44, 68, 16, 32, 44, 88, 96, 22, 44, 68, 96, 122, 4, 8, 16, 22, 34, 8, 16, 32, 44, 68, 16, 32, 59, 68, 106, 22, 44, 68, 116, 142
Offset: 0

Views

Author

Chai Wah Wu, Jul 09 2025

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[Mod[Binomial[n,k],5],{k,0,n}];Array[a,60,0] (* James C. McMahon, Jul 10 2025 *)
  • Python
    from gmpy2 import digits
    from sympy.abc import x
    from sympy import Poly, rem
    def A385825(n):
        k = (1,2,4,3)
        s = digits(n,5)
        t = [s.count(str(i)) for i in range(1,5)]
        G = 2**t[0]*(x+2)**t[1]*(2*x**2+3)**t[3]*(2*x**3+2)**t[2]
        c = Poly(rem(G,x**4-1),x).all_coeffs()[::-1]
        return int(sum(k[i]*c[i] for i in range(len(c)) if c[i]))

Formula

Row sums of A095140. - R. J. Mathar, Jul 19 2025