OFFSET
1,1
FORMULA
a(n) = A066249(n) + 1. - Filip Zaludek, Dec 10 2016
EXAMPLE
Lowest composite number is 4, lowest prime number is 2, next composite number after 4 is 6, next prime number after 2 is 3 and so on.
MATHEMATICA
f[n_]:=Module[{prs=Prime[Range[n]], comps}, comps=Rest[Complement[Range[n+ Length[prs]+1], prs]]; Riffle[comps, prs]] (* Harvey P. Dale, May 10 2011 *)
PROG
(Magma) P:=[ n : n in [2..150] | IsPrime(n) ]; C:=[ n : n in [2..70] | not IsPrime(n) ]; &cat[ [C[k], P[k] ]: k in [1..Minimum(#C, #P)] ]; // Klaus Brockhaus, Mar 31 2007
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Edwin F. Sampang, Mar 30 2007
EXTENSIONS
Edited and extended by Klaus Brockhaus, Mar 31 2007
STATUS
approved