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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A156660 Characteristic function of Sophie Germain primes. 20
0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 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, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

LINKS

R. Zumkeller, Table of n, a(n) for n = 0..10000

Index entries for characteristic functions

Wikipedia, Sophie Germain prime

FORMULA

a(n) = if n and also 2*n+1 is prime then 1 else 0.

a(A005384(n)) = 1; a(A138887(n)) = 0; a(A053176(n)) = 0.

A156874(n) = Sum_{k=1..n} a(k). - Reinhard Zumkeller, Feb 18 2009

a(n) = A010051(n)*A010051(2*n+1).

For n>1 a(n) = floor((floor(phi(n)/(n-1)) + floor(phi(2*n+1)/(2*n)))/2). - Enrique Pérez Herrero, Apr 28 2012

For n>1 a(n) = floor(phi(2*n^2+n)/(2*n^2-2*n)). - Enrique Pérez Herrero, May 02 2012

PROG

(Haskell)

a156660 n = fromEnum $ a010051 n == 1 && a010051 (2 * n + 1) == 1

-- _Reinhard Zmkeller_, May 01 2012

(PARI) a(n)=isprime(n)&&isprime(2*n+1) \\ Felix Fröhlich, Aug 11 2014

CROSSREFS

Cf. A156659.

Cf. A005384, A156874, A092816.

Sequence in context: A327174 A269723 A284487 * A155899 A284932 A117814

Adjacent sequences:  A156657 A156658 A156659 * A156661 A156662 A156663

KEYWORD

nonn

AUTHOR

Reinhard Zumkeller, Feb 13 2009

EXTENSIONS

Definition corrected by Daniel Forgues, Aug 04 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 November 14 10:20 EST 2019. Contains 329111 sequences. (Running on oeis4.)