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.

A286576 a(n) = A132971(n) mod 3.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 30 2017

Keywords

Crossrefs

Programs

  • Python
    from sympy import mobius, prime, log
    import math
    def A(n): return n - 2**int(math.floor(log(n, 2)))
    def b(n): return n + 1 if n<2 else prime(1 + (len(bin(n)[2:]) - bin(n)[2:].count("1"))) * b(A(n))
    def a(n): return mobius(b(n))%3 # Indranil Ghosh, May 30 2017
  • Scheme
    (define (A286576 n) (modulo (A132971 n) 3))
    

Formula

a(n) = A010872(A132971(n)) = A132971(n) mod 3.