login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A106743 a(n) = -1 iff n is prime, a(n) = 1 iff n is not squarefree, otherwise (n is nonprime and squarefree) a(n) = 0. 1
0, -1, -1, 1, -1, 0, -1, 1, 1, 0, -1, 1, -1, 0, 0, 1, -1, 1, -1, 1, 0, 0, -1, 1, 1, 0, 1, 1, -1, 0, -1, 1, 0, 0, 0, 1, -1, 0, 0, 1, -1, 0, -1, 1, 1, 0, -1, 1, 1, 1, 0, 1, -1, 1, 0, 1, 0, 0, -1, 1, -1, 0, 1, 1, 0, 0, -1, 1, 0, 0, -1, 1, -1, 0, 1, 1, 0, 0, -1, 1, 1, 0, -1, 1, 0, 0, 0, 1, -1, 1, 0, 1, 0, 0, 0, 1, -1, 1, 1, 1, -1, 0, -1, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

G. C. Greubel, Table of n, a(n) for n = 1..1000

FORMULA

a(n) = 1 - 0^(A001222(n)-A001221(n)) - 0^(A001222(n)-1), for n>1. - Reinhard Zumkeller, May 23 2005

MATHEMATICA

Table[Which[PrimeQ[n], -1, SquareFreeQ[n], 0, True, 1], {n, 110}] (* Harvey P. Dale, Aug 30 2015 *)

PROG

(PARI) for(n=1, 105, print1(if(!issquarefree(n), 1, if(isprime(n), -1, 0)), ", "))

CROSSREFS

Cf. A000040 (prime), A013929 (not squarefree), A000469 (nonprime and squarefree), A082926.

Sequence in context: A268411 A069513 A092248 * A284944 A284674 A225181

Adjacent sequences:  A106740 A106741 A106742 * A106744 A106745 A106746

KEYWORD

sign

AUTHOR

Giovanni Teofilatto, May 16 2005

EXTENSIONS

Edited and extended by Klaus Brockhaus, May 16 2005

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 25 03:49 EST 2020. Contains 331241 sequences. (Running on oeis4.)