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.

Previous Showing 11-14 of 14 results.

A098534 Mod 3 analog of Stern's diatomic series.

Original entry on oeis.org

0, 1, 1, 2, 3, 2, 2, 4, 3, 4, 7, 5, 6, 5, 5, 4, 6, 4, 4, 8, 6, 8, 8, 7, 6, 10, 7, 8, 15, 11, 14, 10, 12, 10, 13, 11, 12, 11, 11, 10, 12, 10, 10, 11, 9, 8, 14, 10, 12, 10, 10, 8, 12, 8, 8, 16, 12, 16, 13, 14, 12, 17, 14, 16, 18, 16, 16, 17, 15, 14, 17, 13, 12, 22, 16, 20, 18, 17, 14, 22
Offset: 0

Views

Author

Paul Barry, Sep 13 2004

Keywords

Comments

Essentially diagonal sums of Pascal's triangle modulo 3.

Crossrefs

Programs

  • Magma
    [0] cat [(&+[Binomial(n-k-1,k) mod 3: k in [0..Floor((n-1)/2)]]): n in [1..100]]; // G. C. Greubel, Jan 17 2018
  • Mathematica
    Table[Sum[Mod[Binomial[n - k - 1, k], 3], {k, 0, Floor[(n - 1)/2]}], {n, 0, 100}] (* G. C. Greubel, Jan 17 2018 *)
  • PARI
    for(n=0,100, print1(sum(k=0,floor((n-1)/2), lift(Mod(binomial(n-k-1,k),3))), ", ")) \\ G. C. Greubel, Jan 17 2018
    

Formula

a(n) = Sum_{k=0..floor((n-1)/2)} mod(binomial(n-k-1, k), 3).

A113045 Number triangle binomial(n,floor((n-k)/2)) mod 3.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 0, 0, 0, 0, 1, 1, 2, 2, 0, 0, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1
Offset: 0

Views

Author

Paul Barry, Oct 11 2005

Keywords

Comments

Row sums appear to be A051638. First row appears to be A039971. Diagonal sums are A113046.

Examples

			Rows begin
1;
1,1;
2,1,1;
0,0,1,1;
0,1,1,1,1;
1,1,2,2,1,1;
2,0,0,0,0,1,1;
		

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]))

A385859 a(n) = Sum_{k=0..n} (C(n,k) mod 3)^2.

Original entry on oeis.org

1, 2, 6, 2, 4, 12, 6, 12, 21, 2, 4, 12, 4, 8, 24, 12, 24, 42, 6, 12, 21, 12, 24, 42, 21, 42, 66, 2, 4, 12, 4, 8, 24, 12, 24, 42, 4, 8, 24, 8, 16, 48, 24, 48, 84, 12, 24, 42, 24, 48, 84, 42, 84, 132, 6, 12, 21, 12, 24, 42, 21, 42, 66, 12, 24, 42, 24, 48, 84, 42
Offset: 0

Views

Author

Chai Wah Wu, Jul 10 2025

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[Mod[Binomial[n,k],3]^2,{k,0,n}]; Array[a,70,0] (* Stefano Spezia, Jul 10 2025 *)
  • Python
    from gmpy2 import digits
    def A385859(n): return 5*3**(s:=digits(n,3)).count('2')-3<>1

Formula

If n has k '1' digits and m '2' digits in base 3, then a(n) = 2^(k-1)*(5*3^m - 3).
Previous Showing 11-14 of 14 results.