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!)
A175191 a(n) = the smallest positive integer such that (the n-th prime)+2*a(n) is composite. 2

%I #15 Oct 02 2020 18:38:00

%S 1,3,2,1,2,1,2,1,1,2,1,1,2,1,1,1,2,1,1,2,1,1,1,1,1,2,1,2,1,1,1,1,2,1,

%T 2,1,1,1,1,1,2,1,2,1,2,1,1,1,2,1,1,2,1,1,1,1,2,1,1,2,1,1,1,2,1,1,1,1,

%U 2,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,1,1,1,1,2,1,1,1,1,1,1,1,1,2,1,1,1,1,1,2,1

%N a(n) = the smallest positive integer such that (the n-th prime)+2*a(n) is composite.

%C Every term except a(2) (which is 3) is either 1 or 2.

%H G. C. Greubel, <a href="/A175191/b175191.txt">Table of n, a(n) for n = 1..1000</a>

%p a:= n-> `if`(n=2, 3, `if`(isprime(ithprime(n)+2), 2, 1)):

%p seq(a(n), n=1..105); # _Alois P. Heinz_, Oct 02 2020

%t spi[n_]:=Module[{i=1},While[PrimeQ[Prime[n]+2i],i++];i]; Array[spi,110] (* _Harvey P. Dale_, Apr 23 2012 *)

%K nonn

%O 1,2

%A _Leroy Quet_, Mar 01 2010

%E Extended by _Ray Chandler_, Mar 04 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 25 06:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)