A074090 Number of steps to reach an integer starting with s = n/4 and iterating the map x -> s*ceiling(x).
3, 1, 2, 0, 3, 2, 13, 0, 1, 1, 1, 0, 4, 3, 2, 0, 2, 1, 9, 0, 2, 2, 2, 0, 1, 1, 1, 0, 7, 4, 3, 0, 7, 1, 3, 0, 4, 2, 3, 0, 1, 1, 1, 0, 2, 3, 4, 0, 5, 1, 10, 0, 5, 2, 13, 0, 1, 1, 1, 0, 14, 5, 8, 0, 5, 1, 2, 0, 10, 2, 11, 0, 1, 1, 1, 0, 6, 3, 2, 0, 2, 1, 17, 0, 2, 2, 2, 0, 1, 1, 1, 0, 3, 4, 6, 0, 16, 1, 5, 0, 3, 2, 4
Offset: 5
Keywords
Programs
-
Maple
f := proc(b1,b2) local c1,c2,t1,t2,t3,t4,i; c1 := numer(b1/b2); c2 := denom(b1/b2); i := 0; while c2 <> 1 do i := i+1; t1 := ceil(c1/c2); t2 := b1*t1; t3 := t2/b2; c1 := numer(t3); c2 := denom(t3); od: RETURN(i); end; [seq(f(n,4),n=5..120)];