login
This site is supported by donations to The OEIS Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

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) = isprime(n) * ceiling(( isprime(n+2) + isprime(n-2) )/2). - 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: A060510 A219071 A072629 * A257531 A151763 A022925

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 January 18 13:34 EST 2019. Contains 319271 sequences. (Running on oeis4.)