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.

A285736 a(n) = A285735(n) - A285734(n) = n - 2*A285734(n).

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 3, 2, 3, 0, 1, 0, 1, 0, 5, 4, 3, 4, 7, 0, 1, 0, 3, 2, 3, 0, 1, 0, 1, 0, 3, 2, 5, 0, 7, 2, 7, 0, 5, 2, 3, 0, 1, 0, 1, 0, 5, 4, 3, 8, 7, 0, 7, 8, 3, 4, 5, 0, 1, 0, 1, 0, 3, 2, 3, 0, 1, 0, 1, 0, 3, 2, 3, 0, 1, 0, 1, 0, 3, 2, 3, 0, 1, 0, 1, 0, 5, 4, 3, 4, 15, 0, 1, 0, 11, 10, 5, 4, 7, 6, 9, 0, 11, 2, 11, 0, 15, 2, 7, 0, 5, 2, 3, 0, 1, 0, 1, 0, 3
Offset: 1

Views

Author

Antti Karttunen, May 02 2017

Keywords

Crossrefs

Cf. A005117 (2*A005117 gives the positions of zeros), A285734, A285735.

Programs

  • Python
    from sympy.ntheory.factor_ import core
    def issquarefree(n): return core(n) == n
    def a285734(n):
        if n==1: return 0
        j=n//2
        while True:
            if issquarefree(j) and issquarefree(n - j): return j
            else: j-=1
    def a285736(n): return n - 2*a285734(n)
    print([a285736(n) for n in range(1, 101)]) # Indranil Ghosh, May 02 2017
  • Scheme
    (define (A285736 n) (- (A285735 n) (A285734 n)))
    (define (A285736 n) (- n (* 2 (A285734 n))))
    

Formula

a(n) = A285735(n) - A285734(n) = n - 2*A285734(n).