OFFSET
0,2
COMMENTS
The same terms > 3 would be obtained when starting with a(1)=2.
Shevelev cites El Bachraoui, Lemoine-Levy's conjecture and A046927, cf. links.
LINKS
M. El Bachraoui, Primes in the Interval [2n,3n], Int. J. Contemp. Math. Sci., Vol. 1, 2006, no. 13, 617-621.
V. Shevelev in reply to E. Angelini, Primes and prime remainders, SeqFan list, Oct 05 2014
FORMULA
If a(n)+2 is prime, then a(n+1) = a(n)+2, else a(n+1) > 2*a(n), since a(n)+p is even for primes a(n), p > 2.
MATHEMATICA
sp[n_]:=Module[{p=NextPrime[n]}, While[!PrimeQ[Mod[p, n]], p=NextPrime[p]]; p]; Join[{1}, NestList[sp, 3, 20]] (* The program generates the first 21 terms of the sequence. To generate more, increase the constant "20" in the NestList function, but the program may take a long time to run. *) (* Harvey P. Dale, Jan 13 2019 *)
PROG
(PARI) {print1(L=3); for(p=L+1, 9e9, p=nextprime(p); isprime(p%L)&&print1(", "L=p)+(isprime(p+2)||p*=2))}
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric Angelini and M. F. Hasler, Oct 05 2014
STATUS
approved