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!)
A106667 a(n) = 1 if prime(n) + 2 is a prime, a(n) = -1 if prime(n) + 2 is a semiprime, otherwise 0. 1
-1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 0, -1, -1, 1, 0, -1, 1, 0, 0, -1, -1, 0, 1, 0, 1, -1, -1, -1, -1, 1, -1, 1, 0, -1, 0, -1, 0, 1, -1, 1, 0, 1, -1, -1, 0, 1, 0, -1, 1, 0, -1, -1, -1, 1, 0, 0, 1, 0, -1, -1, 1, 0, -1, 0, -1, 1, 0, -1, -1, 0, 0, -1, 0, -1, 0, -1, -1, 1, 0, 1, 0, 0, -1, -1, 0, 1, 0, -1, -1, -1, -1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(1) = -1 because prime(1) = 2 and 2 + 2 = 4 is a semiprime;
a(2) = 1 because prime(2) = 3 and 3 + 2 = 5 is a prime;
a(14) = 0 because prime(14) = 43 and 43 + 2 = 45 is neither prime nor semiprime.
MAPLE
p:= 1:
for n from 1 to 100 do
p:= nextprime(p);
if isprime(p+2) then A[n]:=1
elif numtheory:-bigomega(p+2)=2 then A[n]:=-1
else A[n]:= 0
fi
od:
seq(A[n], n=1..100); # Robert Israel, Aug 29 2018
CROSSREFS
Sequence in context: A014503 A014230 A014451 * A133011 A296079 A354806
KEYWORD
easy,sign,less
AUTHOR
Giovanni Teofilatto, May 13 2005
EXTENSIONS
Corrected, and definition clarified, by Robert Israel, Aug 29 2018
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 March 19 07:14 EDT 2024. Contains 370954 sequences. (Running on oeis4.)