OFFSET
1,2
COMMENTS
Every term except a(2) (which is 3) is either 1 or 2.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Mar 01 2010
EXTENSIONS
Extended by Ray Chandler, Mar 04 2010
STATUS
approved