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.
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
Offset: 1
Keywords
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
Crossrefs
Programs
-
Mathematica
Table[Which[PrimeQ[n],-1,SquareFreeQ[n],0,True,1],{n,110}] (* Harvey P. Dale, Aug 30 2015 *)
-
PARI
for(n=1,105,print1(if(!issquarefree(n),1,if(isprime(n),-1,0)),","))
Formula
Extensions
Edited and extended by Klaus Brockhaus, May 16 2005