login
A285736
a(n) = A285735(n) - A285734(n) = n - 2*A285734(n).
3
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,7
LINKS
FORMULA
a(n) = A285735(n) - A285734(n) = n - 2*A285734(n).
PROG
(Scheme)
(define (A285736 n) (- (A285735 n) (A285734 n)))
(define (A285736 n) (- n (* 2 (A285734 n))))
(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
CROSSREFS
Cf. A005117 (2*A005117 gives the positions of zeros), A285734, A285735.
Sequence in context: A372345 A058513 A319650 * A325142 A047160 A332497
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 02 2017
STATUS
approved