OFFSET
1,1
EXAMPLE
a(1)=0 because 1 is neither a prime nor a prime squared;
a(2)=-1 because 3 is a prime;
a(5)=1 because 9 = 3^2 is a prime squared.
MATHEMATICA
Table[Which[PrimeQ[2n+1], -1, PrimeQ[Sqrt[2n+1]], 1, True, 0], {n, 0, 120}] (* Harvey P. Dale, Jul 05 2022 *)
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Giovanni Teofilatto, May 09 2005
EXTENSIONS
Definition changed to match the data by N. J. A. Sloane, Jul 05 2022 at the suggestion of Harvey P. Dale.
STATUS
approved