login
A106549
a(n) = -1 if 2*n-1 is a prime, 1 if 2*n-1 is a prime squared, or 0 otherwise.
0
0, -1, -1, -1, 1, -1, -1, 0, -1, -1, 0, -1, 1, 0, -1, -1, 0, 0, -1, 0, -1, -1, 0, -1, 1, 0, -1, 0, 0, -1, -1, 0, 0, -1, 0, -1, -1, 0, 0, -1, 0, -1, 0, 0, -1, 0, 0, 0, -1, 0, -1, -1, 0, -1, -1, 0, -1, 0, 0, 0, 1, 0, 0, -1, 0, -1, 0, 0, -1, -1, 0, 0, 0, 0, -1, -1, 0, 0, -1, 0, 0, -1, 0, -1, 1, 0, -1
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
Sequence in context: A242647 A167393 A275606 * A075897 A135947 A360123
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