OFFSET
1,2
EXAMPLE
a(1) is the first nonprime: 1.
a(2) is the second prime: 3.
MATHEMATICA
Module[{nn=100, np, pr, len}, np=Select[Range[nn], !PrimeQ[#]&]; len = Length[ np]; pr=Prime[Range[len]]; Table[If[PrimeQ[n], pr[[n]], np[[n]]], {n, len}]] (* Harvey P. Dale, Oct 01 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Luc Stevens (lms022(AT)yahoo.com), Apr 11 2006
EXTENSIONS
Definition corrected by Michel Marcus, Jun 01 2013
Corrected and extended by Harvey P. Dale, Oct 01 2021
STATUS
approved