OFFSET
1,7
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
PROG
(Scheme)
(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
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 02 2017
STATUS
approved