OFFSET
1,3
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
FORMULA
PROG
(Scheme) (define (A284584 n) (cond ((= 1 n) 0) ((zero? (A008683 n)) (A057627 n)) (else (A013928 n))))
(Python)
from sympy import mobius
from sympy.ntheory.factor_ import core
def a057627(n): return n - sum([mobius(k)**2 for k in range(1, n + 1)])
def a013928(n): return sum([1 for i in range(1, n) if core(i) == i])
def a(n):
if n==1: return 0
if core(n)==n: return a013928(n)
else: return a057627(n)
print([a(n) for n in range(1, 121)]) # Indranil Ghosh, Apr 17 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 17 2017
STATUS
approved