A050206 Triangle read by rows: smallest denominator of the expansion of k/n using the greedy algorithm, 1<=k<=n-1.
2, 3, 2, 4, 2, 2, 5, 3, 2, 2, 6, 3, 2, 2, 2, 7, 4, 3, 2, 2, 2, 8, 4, 3, 2, 2, 2, 2, 9, 5, 3, 3, 2, 2, 2, 2, 10, 5, 4, 3, 2, 2, 2, 2, 2, 11, 6, 4, 3, 3, 2, 2, 2, 2, 2, 12, 6, 4, 3, 3, 2, 2, 2, 2, 2, 2, 13, 7, 5, 4, 3, 3, 2, 2, 2, 2, 2, 2, 14, 7, 5, 4, 3, 3, 2, 2, 2, 2, 2, 2, 2, 15, 8, 5, 4, 3, 3, 3, 2
Offset: 2
Examples
n\k | 1 2 3 4 5 6 7 8 ----*------------------------ 2 | 2; 3 | 3, 2; 4 | 4, 2, 2; 5 | 5, 3, 2, 2; 6 | 6, 3, 2, 2, 2; 7 | 7, 4, 3, 2, 2, 2; 8 | 8, 4, 3, 2, 2, 2, 2; 9 | 9, 5, 3, 3, 2, 2, 2, 2;
Links
- Seiichi Manyama, Rows n = 2..141, flattened
- Eric Weisstein's World of Mathematics, Unit Fraction.
- Wikipedia, Greedy algorithm for Egyptian fractions.
Formula
T(n,k) = ceiling(n/k).
Extensions
Offset changed to 2 by Seiichi Manyama, Sep 18 2022