%I #9 Oct 27 2019 05:09:34
%S 0,1,3,0,4,9,9,16,8,17,27,38,38,51,65,65,81,98,98,117,137,158,158,181,
%T 205,205,231,231,231,260,260,291,323,356,356,391,427,464,464,503,543,
%U 584,584,627,627,627,673,720,672,672,672,672,672,725,779,834,834,834
%N a(0)=0; a(n) = n + a(n-1) if gcd(n,a(n-1)) = 1 or a(n-1) = 0; a(n) = a(n-1) - n if n divides a(n-1), otherwise a(n) = a(n-1).
%Y Cf. A068626, A068627, A068628, A068629.
%K easy,nonn
%O 0,3
%A _Amarnath Murthy_, Feb 26 2002
%E Offset and a(55)-a(57) corrected by _Gionata Neri_, Mar 23 2017