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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A171386 The characteristic function of 2 and 3: 1 if n is prime such that either n-1 or n+1 is prime, else 0. 15
0, 1, 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

A181354(n) + A181376(n) + A181378(n) + A181380(n) + A181384(n) + A181401(n) + A181403(n) + A181405(n) + a(n) = A052268(n).

LINKS

Table of n, a(n) for n=1..105.

Index entries for linear recurrences with constant coefficients, signature (1).

FORMULA

a(n) = A130130(n) - A130130(n-1), for n>0.

MATHEMATICA

Join[{0, 1, 1}, LinearRecurrence[{1}, {0}, 102]] (* Ray Chandler, Sep 23 2015 *)

PROG

(PARI) a(n)=n==2||n==3 \\ Charles R Greathouse IV, Sep 24 2015

CROSSREFS

Cf. A000007, A010051, A063524.

Sequence in context: A072165 A072608 A295304 * A189816 A194685 A182582

Adjacent sequences:  A171383 A171384 A171385 * A171387 A171388 A171389

KEYWORD

nonn,easy,less

AUTHOR

Juri-Stepan Gerasimov, Dec 07 2009

EXTENSIONS

Edited by Charles R Greathouse IV, Mar 23 2010

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 October 22 12:47 EDT 2019. Contains 328318 sequences. (Running on oeis4.)