OFFSET
1,3
COMMENTS
After the initial zero, all terms are squarefree numbers (A005117).
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
FORMULA
PROG
(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 a285735(n): return n - a285734(n)
def a286105(n): return 0 if n==1 else 1 + max(a286105(a285734(n)), a286105(a285735(n)))
def a286106(n): return 0 if n==1 else a286105(a285735(n)) - a286105(a285734(n))
def a286107(n): return 0 if n==1 else a285735(n) if a286106(n)>0 else a285734(n)
print([a286107(n) for n in range(1, 121)]) # Indranil Ghosh, May 02 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 02 2017
STATUS
approved