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

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; internal format)
OFFSET

0,1

COMMENTS

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.

A156875(n) = SUM(a(k): 1<=k<=n). [From Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Feb 18 2009]

LINKS

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

Index entries for characteristic functions

Wikipedia, Safe prime

FORMULA

a(n) = A010051(n)*A010051((n-1)/2).

PROG

(Haskell)

a156659 n = fromEnum $ a010051 n == 1 && a010051 (n `div` 2) == 1

-- Reinhard Zumkeller, Sep 18 2011

CROSSREFS

A156660.

Sequence in context: A202238 A144194 A144196 * A011671 A086483 A011667

Adjacent sequences:  A156656 A156657 A156658 * A156660 A156661 A156662

KEYWORD

nonn

AUTHOR

Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Feb 13 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 14 18:09 EST 2012. Contains 205663 sequences.