The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A284584 a(1) = 0; for n > 1, if n is not squarefree, then a(n) = A057627(n), otherwise a(n) = A013928(n). 3
0, 1, 2, 1, 3, 4, 5, 2, 3, 6, 7, 4, 8, 9, 10, 5, 11, 6, 12, 7, 13, 14, 15, 8, 9, 16, 10, 11, 17, 18, 19, 12, 20, 21, 22, 13, 23, 24, 25, 14, 26, 27, 28, 15, 16, 29, 30, 17, 18, 19, 31, 20, 32, 21, 33, 22, 34, 35, 36, 23, 37, 38, 24, 25, 39, 40, 41, 26, 42, 43, 44, 27, 45, 46, 28, 29, 47, 48, 49, 30, 31, 50, 51, 32, 52, 53, 54, 33, 55, 34, 56, 35, 57, 58, 59, 36 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Each number n > 0 occurs exactly twice in this sequence, at the positions A005117(1+n) and A013929(n).
LINKS
FORMULA
a(1) = 0; for n > 1, if A008683(n) is 0 [when n is not squarefree], then a(n) = A057627(n), otherwise a(n) = A013928(n).
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
Cf. A066136 (a similar sequence).
Sequence in context: A318311 A356294 A338091 * A256100 A340383 A117407
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 17 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 6 00:30 EDT 2024. Contains 373110 sequences. (Running on oeis4.)