login
Number of Egyptian fractions in the representation of n/(n+1) via the greedy algorithm.
6

%I #27 Sep 18 2022 09:03:31

%S 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,

%T 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,

%U 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

%N Number of Egyptian fractions in the representation of n/(n+1) via the greedy algorithm.

%C a(n) = length of n-th row in table A247765. - _Reinhard Zumkeller_, Sep 25 2014

%H Seiichi Manyama, <a href="/A100678/b100678.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..100 from Reinhard Zumkeller)

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Greedy_algorithm_for_Egyptian_fractions">Greedy algorithm for Egyptian fractions</a>

%e a(16) = 5 because 16/17 = 1/2 + 1/3 + 1/10 + 1/128 + 1/32640.

%o (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

%o (Haskell)

%o a100678 = length . a247765_row -- _Reinhard Zumkeller_, Sep 25 2014

%Y Cf. A100695.

%Y Cf. A247765.

%K nonn

%O 1,2

%A _Pahikkala Jussi_, Dec 06 2004

%E More terms from _M. F. Hasler_, Sep 25 2014