login
This site is supported by donations 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

Antti Karttunen, Table of n, a(n) for n = 1..10000

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 xrange(1, n + 1)])

def a013928(n): return sum([1 for i in xrange(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 xrange(1, 121)] # Indranil Ghosh, Apr 17 2017

CROSSREFS

Cf. A005117, A008683, A013928, A013929, A057627, A243343, A243345, A243347, A243352.

Cf. A066136 (a similar sequence).

Sequence in context: A286449 A318310 A318311 * A256100 A117407 A232095

Adjacent sequences:  A284581 A284582 A284583 * A284585 A284586 A284587

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 | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 19 14:52 EST 2018. Contains 317352 sequences. (Running on oeis4.)