login
The OEIS is supported by the many generous donors 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

%I #33 Sep 24 2015 12:02:38

%S 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,

%T 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,

%U 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

%N The characteristic function of 2 and 3: 1 if n is prime such that either n-1 or n+1 is prime, else 0.

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

%H <a href="/index/Rec#order_01">Index entries for linear recurrences with constant coefficients</a>, signature (1).

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

%t Join[{0, 1, 1},LinearRecurrence[{1},{0},102]] (* _Ray Chandler_, Sep 23 2015 *)

%o (PARI) a(n)=n==2||n==3 \\ _Charles R Greathouse IV_, Sep 24 2015

%Y Cf. A000007, A010051, A063524.

%K nonn,easy,less

%O 1,1

%A _Juri-Stepan Gerasimov_, Dec 07 2009

%E Edited by _Charles R Greathouse IV_, Mar 23 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 13:50 EDT 2024. Contains 371780 sequences. (Running on oeis4.)