login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 19:39 EDT 2024. Contains 371963 sequences. (Running on oeis4.)