OFFSET
1,3
EXAMPLE
The noncomposites among the first 7 terms of the sequence are 1,1,2,2,2,5. Of these, three terms (1,1,5) are coprime to 8. So a(8)=3.
MATHEMATICA
f[l_List] := Append[l, Length[Select[l, GCD[ #, Length[l] + 1] == 1 && (PrimeQ[ # ] || # == 1) &]]]; Nest[f, {1}, 80] (* Ray Chandler, Dec 11 2006 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Dec 08 2006
EXTENSIONS
Extended by Ray Chandler, Dec 11 2006
STATUS
approved