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.

Showing 1-3 of 3 results.

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

A385826 a(n) = Sum_{k=0..n} (binomial(n, k) mod 7).

Original entry on oeis.org

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, 60, 92, 16, 32, 43, 72, 81, 120, 121, 18, 36, 58, 60, 120, 100, 144, 22, 44, 67, 92, 121, 144, 169, 2, 4, 8, 16, 32, 36, 44, 4, 8, 16, 32, 64, 72, 88, 8, 16, 32, 64, 86
Offset: 0

Views

Author

Chai Wah Wu, Jul 09 2025

Keywords

Comments

Sum of n-th row of Pascal's triangle mod 7, A095142.

Crossrefs

Programs

  • Python
    from gmpy2 import digits
    from sympy.abc import x
    from sympy import Poly, rem
    def A385826(n):
        k = (1,3,2,6,4,5)
        s = digits(n,7)
        t = [s.count(str(i)) for i in range(1,7)]
        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]
        c = Poly(rem(G,x**6-1),x).all_coeffs()[::-1]
        return int(sum(k[i]*c[i] for i in range(len(c)) if c[i]))

A385828 a(n) = Sum_{k=0..n} (binomial(n, k) mod 11).

Original entry on oeis.org

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

Views

Author

Chai Wah Wu, Jul 09 2025

Keywords

Comments

Sum of n-th row of Pascal's triangle mod 11, A095144.

Crossrefs

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]))
Showing 1-3 of 3 results.