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!)
A164292 Binary sequence identifying the twin primes (characteristic function of twin primes: 1 if n is a twin prime else 0). 11
0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 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, 1, 0, 1, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Similar to prime binary digit sequence A010051.
In decimal notation A164292=0.1646823906345389353962381...
See also A164293 (similar to prime decimal sequence A051006).
a(A001097(n))=1; a(A001359(n))=1; a(A006512(n))=1. - Reinhard Zumkeller, Mar 29 2010
Characteristic function of A001097. - Georg Fischer, Aug 04 2021
LINKS
FORMULA
a(n) = A057427(A010051(n)*(A010051(n-2)+A010051(n+2))), for n>2. - Reinhard Zumkeller, Mar 29 2010
a(n) = c(n) * ceiling(( c(n+2) + c(n-2) )/2), where c is the prime characteristic. - Wesley Ivan Hurt, Jan 31 2014
MATHEMATICA
Table[(PrimePi[n] - PrimePi[n - 1]) * Ceiling[(PrimePi[n + 2] - PrimePi[n + 1] + PrimePi[n - 2] - PrimePi[n - 3])/2], {n, 100}] (* Wesley Ivan Hurt, Jan 31 2014 *)
PROG
(Haskell)
a164292 1 = 0
a164292 2 = 0
a164292 n = signum (a010051' n * (a010051' (n - 2) + a010051' (n + 2)))
-- Reinhard Zumkeller, Feb 03 2014
CROSSREFS
Sequence in context: A327205 A219071 A072629 * A337802 A257531 A151763
KEYWORD
nonn
AUTHOR
Carlos Alves, Aug 12 2009
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 30 08:35 EDT 2024. Contains 372131 sequences. (Running on oeis4.)