A087656 Let f be defined on the rationals by f(p/q) =(p+1)/(q+1)=p_{1}/q_{1} where (p_{1},q_{1})=1. Let f^k(p/q)=p_{k}/q_{k} where (p_{k},q_{k})=1. Sequence gives least k such that p_{k}-q_{k} = 1 starting at n.
1, 2, 2, 4, 3, 6, 3, 4, 5, 10, 4, 12, 7, 6, 4, 16, 5, 18, 6, 8, 11, 22, 5, 8, 13, 6, 8, 28, 7, 30, 5, 12, 17, 10, 6, 36, 19, 14, 7, 40, 9, 42, 12, 8, 23, 46, 6, 12, 9, 18, 14, 52, 7, 14, 9, 20, 29, 58, 8, 60, 31, 10, 6, 16, 13, 66, 18, 24, 11, 70, 7, 72, 37, 10, 20, 16, 15, 78, 8, 8, 41, 82
Offset: 3
Keywords
Examples
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.
Crossrefs
Same as A059975 apart from offset.
Programs
-
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)
Comments