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!)
A302047 a(n) = 1 if n = prime(k)*prime(2+k) for some k, otherwise 0. 4
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Characteristic function for prime(n)*prime(n+2) (A090076).
LINKS
FORMULA
a(n) = A185015(A246277(n)).
MATHEMATICA
Array[Boole@ And[Length@ # == 2, Max@ #[[All, -1]] == 1, Subtract @@ PrimePi[#[[All, 1]]] == -2 ] &@ FactorInteger@ # &, 120] (* or *)
With[{s = Array[Prime[#] Prime[# + 2] &, 5]}, ReplacePart[ConstantArray[0, Max@ s], Map[# -> 1 &, s] ] ] (* Michael De Vlieger, Apr 27 2018 *)
Module[{pp2=Table[Prime[n]Prime[n+2], {n, 5}], nn}, nn=Max[pp2]; Table[ If[ MemberQ[ pp2, k], 1, 0], {k, nn}]] (* Harvey P. Dale, Dec 13 2021 *)
PROG
(PARI) A302047(n) = if((2!=bigomega(n))||(2!=omega(n)), 0, my(f=factor(n)); (f[2, 1] == nextprime(1+nextprime(1+f[1, 1]))));
CROSSREFS
Sequence in context: A323514 A369660 A353495 * A044940 A284261 A037825
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 24 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 May 9 19:33 EDT 2024. Contains 372354 sequences. (Running on oeis4.)