OFFSET
1,1
COMMENTS
This sequence is a permutation of the composite positive integers.
Indices of composites: {1, 4, 3, 8, 2, 15, 5, 12, 7, 17, 6, 23, 9, 21, 13, 26, 10, 33, 11, 35, 16, 30, 14, 38, 18, 40, 20, 46, ...}. - Michael De Vlieger, Jul 23 2017
Each composite k occurs in the sequence no later than a(k-1). Proof by induction. - Peter Munn, Sep 01 2017
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..3000
MATHEMATICA
a = {4}; Do[k = 6; While[Nand[CompositeQ@ k, ! MemberQ[a, k], CoprimeQ[k, n]], k++]; AppendTo[a, k], {n, 2, 69}]; a (* Michael De Vlieger, Jul 23 2017 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Leroy Quet, Aug 02 2009
EXTENSIONS
More terms from Sean A. Irvine, Nov 11 2009
STATUS
approved