OFFSET
3,2
COMMENTS
Proof that this is the same as A059975 except for offset, from Joseph Myers, Feb 21 2004. Claim: a(n+1) = A059975(n). If p is the least prime factor of n then the rule here gives (n+1)/1 -> (n+2)/2 -> ... -> (n+p)/p = (n/p + 1)/1 so a(n+1) = a(n/p + 1) + (p-1) and clearly A059975(n) = A059975(n/p) + (p-1). The natural start for the induction is A059975(1) = a(2) = 0 (one place before the currently listed sequences start).
EXAMPLE
6 -> (6+1)/(1+1) = 7/2 -> (7+1)/(2+1) = 8/3 -> (8+1)/(3+1) = 9/4 -> (9+1)/(4+1) = 2/1 and 2-1 = 1 hence a(6) = 4.
PROG
(PARI) a(x)=if(x<0, 0, c=0; while(abs(numerator(x)-denominator(x)-1)>0, x=(numerator(x)+1)/(denominator(x)+1); c++); c)
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Oct 04 2003
STATUS
approved