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.

A166408 a(n) = floor(A166407(n)/3).

Original entry on oeis.org

-1, 0, 0, 1, -3, 1, 0, 2, 0, 1, 0, 3, -10, 0, 0, 3, 0, 2, 0, 4, 0, 1, 0, 5, -21, 2, 0, 4, 0, 3, 0, 2, 0, 1, 0, 7, 0, 0, 0, 5, -27, 3, 0, 6, 0, 2, 0, 8, 0, 0, 0, 5, 0, 3, 0, 8, 0, 2, 0, 10, -55, 2, 0, 5, 0, 5, 0, 2, 0, 3, 0, 10, 0, 0, 0, 7, 0, 4, 0, 10, 0, 1, 0, 11, -78, 2, 0, 2, 0, 5, 0, 8, 0, 2, 0
Offset: 0

Views

Author

Antti Karttunen, Oct 21 2009

Keywords

Comments

See the conjecture in A166407. If true, then a(i) = A166406(i)/A005408(i), whenever i is not in A166101.

Crossrefs

A165951(n)=a(A102781(n)) for n>=2.

Programs

  • Python
    from sympy import floor, jacobi_symbol as J
    def a(n):
        l=0
        m=0
        for i in range(1, 2*n + 2):
            if J(i, 2*n + 1)==-1: l+=i
            elif J(i, 2*n + 1)==1: m+=i
        return floor(3*((l - m)/(2*n + 1)))//3
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 12 2017