OFFSET
1,2
COMMENTS
Sequence is a permutation of the positive integers.
LINKS
EXAMPLE
Since 6 is composite, a(6) = a(5)th (4th) smallest positive integer not occurring earlier in sequence. The terms not occurring earlier in sequence are 5,7,8,9,10... and the 4th of these is 9.
MATHEMATICA
a = {1}; Do[AppendTo[a, Complement[Range[Max[a] + a[[-1]] + 1], a][[If[PrimeQ[n], 1, a[[-1]]]]]], {n, 2, 67}]; a (* Ivan Neretin, May 09 2015 *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Leroy Quet, Feb 18 2005
EXTENSIONS
More terms from John W. Layman, May 27 2005
Corrected by Franklin T. Adams-Watters, Nov 22 2006
STATUS
approved