A175191 a(n) = the smallest positive integer such that (the n-th prime)+2*a(n) is composite.
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, 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, 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
Offset: 1
Keywords
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
Programs
-
Maple
a:= n-> `if`(n=2, 3, `if`(isprime(ithprime(n)+2), 2, 1)): seq(a(n), n=1..105); # Alois P. Heinz, Oct 02 2020
-
Mathematica
spi[n_]:=Module[{i=1},While[PrimeQ[Prime[n]+2i],i++];i]; Array[spi,110] (* Harvey P. Dale, Apr 23 2012 *)
Extensions
Extended by Ray Chandler, Mar 04 2010
Comments