OFFSET
1,3
LINKS
Diana L. Mecum, Table of n, a(n) for n = 1..1011
EXAMPLE
The positive integers which are <= 9 and are missing from the first 8 terms of the sequence are 3,7,8,9. There are 4 such integers, so a(9) is the number of earlier terms which are coprime to 4. Therefore a(9) = 3.
MATHEMATICA
t = {1, 1, 2, 2, 4, 5, 6, 6, 3, 4}; n = 11; count = 0; comp = Complement[Range[Length[t] + 1], t]; Do[If[CoprimeQ[t[[j]], Length[comp]], count = count + 1], {j, 1, Length[t]}]; t = Append[t, count]; Do[n = n + 1; count = 0; comp = Complement[Range[Length[t] + 1], t]; Do[If[CoprimeQ[t[[j]], Length[comp]], count = count + 1], {j, 1, Length[t]}]; t = Append[t, count], {100}]; t (* Diana L. Mecum, Aug 06 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, May 31 2007
EXTENSIONS
Terms corrected by Diana L. Mecum, Aug 06 2012
STATUS
approved