login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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. [From Reinhard Zumkeller, Mar 29 2010]

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

Index entries for characteristic functions [From Reinhard Zumkeller, Mar 29 2010]

FORMULA

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

Cf. A129950, A010051, A164293, A051006.

a(n) = A057427(A010051(n)*(A010051(n-2)+A010051(n+2))), n>2. [From Reinhard Zumkeller, Mar 29 2010]

Sequence in context: A327205 A219071 A072629 * A337802 A257531 A151763

Adjacent sequences:  A164289 A164290 A164291 * A164293 A164294 A164295

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 22:45 EDT 2021. Contains 343098 sequences. (Running on oeis4.)