OFFSET
1,1
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
MATHEMATICA
CompositeNext[n_]:=Module[{k=n+1}, While[PrimeQ[k], k++ ]; k]; lst={}; Do[p=n+CompositeNext[n]; If[PrimeQ[p], AppendTo[lst, n]], {n, 2, 6!}]; lst (* Vladimir Joseph Stephan Orlovsky, Jun 15 2009 *)
Position[#, 2] &@ Table[k = 1; While[! PrimeQ[k n + 1], k++]; k, {n, 180}] // Flatten (* Michael De Vlieger, Mar 02 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Edited by N. J. A. Sloane, Oct 27 2012
STATUS
approved