A100678 Number of Egyptian fractions in the representation of n/(n+1) via the greedy algorithm.
1, 2, 2, 3, 2, 3, 3, 3, 3, 4, 3, 4, 4, 3, 4, 5, 3, 4, 4, 4, 4, 5, 3, 4, 4, 4, 4, 5, 4, 6, 4, 4, 5, 5, 4, 5, 5, 5, 4, 5, 3, 4, 4, 4, 4, 5, 4, 4, 5, 4, 5, 5, 4, 5, 4, 5, 5, 5, 4, 5, 6, 4, 5, 5, 5, 6, 5, 5, 4, 6, 5, 5, 5, 5, 5, 5, 4, 5, 6, 6, 5, 6, 4, 5, 6, 5, 6, 6, 5, 4, 5, 5, 5, 5, 5
Offset: 1
Keywords
Examples
a(16) = 5 because 16/17 = 1/2 + 1/3 + 1/10 + 1/128 + 1/32640.
Links
- Seiichi Manyama, Table of n, a(n) for n = 1..10000 (terms 1..100 from Reinhard Zumkeller)
- Wikipedia, Greedy algorithm for Egyptian fractions
Programs
-
Haskell
a100678 = length . a247765_row -- Reinhard Zumkeller, Sep 25 2014
-
PARI
A100678(n)={ my(x = n/(n+1), nb = 1); while(x -= 1/ceil(1/x), nb++); nb} \\ Michel Marcus, Aug 12 2013, minor edits by M. F. Hasler, Sep 25 2014
Extensions
More terms from M. F. Hasler, Sep 25 2014
Comments