This site is supported by donations to The OEIS Foundation.

 Annual Appeal: Please make a donation to keep the OEIS running. In 2018 we replaced the server with a faster one, added 20000 new sequences, and reached 7000 citations (often saying "discovered thanks to the OEIS"). Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A156659 Characteristic function of safe primes. 13
 0, 0, 0, 0, 0, 1, 0, 1, 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, 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, 1, 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 0,1 LINKS R. Zumkeller, Table of n, a(n) for n = 0..10000 Wikipedia, Safe prime FORMULA a(n) = if n and also (n-1)/2 is prime then 1 else 0; a(A005385(n)) = 1; a(A156657(n)) = 0; a(A059456(n)) = 0. a(n) = A010051(n)*A010051((n-1)/2). A156875(n) = Sum_{k=1..n} a(k). - Reinhard Zumkeller, Feb 18 2009 a(n) = 1 iff A292936(n) > 1. - Antti Karttunen, Dec 15 2017 MATHEMATICA Array[Boole[And[PrimeQ@ #, PrimeQ[(# - 1)/2]]] &, 105, 0] (* Michael De Vlieger, Dec 16 2017 *) PROG (Haskell) a156659 n = fromEnum \$ a010051 n == 1 && a010051 (n `div` 2) == 1 -- Reinhard Zumkeller, Sep 18 2011 (PARI) a(n) = isprime(n) && isprime(floor((n-1)/2)) \\ Iain Fox, Dec 17 2017 CROSSREFS Cf. A005385, A156660, A292936. Sequence in context: A202238 A144194 A144196 * A011671 A086483 A011667 Adjacent sequences:  A156656 A156657 A156658 * A156660 A156661 A156662 KEYWORD nonn AUTHOR Reinhard Zumkeller, Feb 13 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.

Last modified December 11 22:04 EST 2018. Contains 318052 sequences. (Running on oeis4.)