Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #12 Feb 10 2019 23:03:19
%S 1,1,2,3,4,4,3,4,2,9,10,8,5,3,14,15,16,12,2,12,8,21,22,13,24,23,24,17,
%T 16,17,30,31,20,33,34,22,15,15,38,34,17,18,8,23,44,45,43,10,21,15,39,
%U 10,23,25,54,55,36,35,36,44,26,39,62,49,64,41,66,61,43,29,41,31,72,58,21
%N a(0)=1. a(n) is the number of earlier terms of the sequence that are coprime to (n+a(n-1)).
%e 11 + a(10) = 21. There are 8 terms among a(0), a(1), ..., a(10) that are coprime to 21. (These terms are a(0), a(1), a(2), a(4), a(5), a(7), a(8) and a(10).) So a(11) = 8.
%p a[0]:=1: for n from 1 to 120 do ct:=0: for i from 0 to n-1 do if igcd(a[i],n+a[n-1])=1 then ct:=ct+1 else ct:=ct: fi: od: a[n]:=ct: od: seq(a[n],n=0..100); # _Emeric Deutsch_, May 05 2007
%Y Cf. A129457.
%K nonn
%O 0,3
%A _Leroy Quet_, Apr 16 2007
%E More terms from _Emeric Deutsch_, May 05 2007