cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A247765 Table of denominators in the Egyptian fraction representation of n/(n+1) by the greedy algorithm.

This page as a plain text file.
%I A247765 #20 Sep 18 2022 09:07:33
%S A247765 2,2,6,2,4,2,4,20,2,3,2,3,42,2,3,24,2,3,18,2,3,15,2,3,14,231,2,3,12,2,
%T A247765 3,12,156,2,3,11,231,2,3,10,2,3,10,240,2,3,10,128,32640,2,3,9,2,3,9,
%U A247765 342,2,3,9,180,2,3,9,126,2,3,9,99,2,3,9,83,34362
%N A247765 Table of denominators in the Egyptian fraction representation of n/(n+1) by the greedy algorithm.
%C A247765 A100678(n) = length of n-th row;
%C A247765 T(n, A100678(n)) = A100695(n).
%H A247765 Seiichi Manyama, <a href="/A247765/b247765.txt">Rows n = 1..1000 of triangle, flattened</a> (Rows n = 1..100 from Reinhard Zumkeller)
%e A247765 .   1:  2
%e A247765 .   2:  2, 6
%e A247765 .   3:  2, 4
%e A247765 .   4:  2, 4, 20
%e A247765 .   5:  2, 3
%e A247765 .   6:  2, 3, 42
%e A247765 .   7:  2, 3, 24
%e A247765 .   8:  2, 3, 18
%e A247765 .   9:  2, 3, 15
%e A247765 .  10:  2, 3, 14, 231
%e A247765 .  11:  2, 3, 12
%e A247765 .  12:  2, 3, 12, 156
%e A247765 .  13:  2, 3, 11, 231
%e A247765 .  14:  2, 3, 10
%e A247765 .  15:  2, 3, 10, 240
%e A247765 .  16:  2, 3, 10, 128, 32640
%e A247765 .  17:  2, 3,  9
%e A247765 .  18:  2, 3,  9, 342
%e A247765 .  19:  2, 3,  9, 180
%e A247765 .  20:  2, 3,  9, 126
%o A247765 (Haskell)
%o A247765 import Data.Ratio ((%), numerator, denominator)
%o A247765 a247765 n k = a247765_tabf !! (n-1) !! (k-1)
%o A247765 a247765_tabf = map a247765_row [1..]
%o A247765 a247765_row n = f (map recip [2..]) (n % (n + 1)) where
%o A247765    f es x | numerator x == 1 = [denominator x]
%o A247765           | otherwise        = g es
%o A247765           where g (u:us) | u <= x    = (denominator u) : f us (x - u)
%o A247765                          | otherwise =  g us
%Y A247765 Cf. A100678, A100695.
%K A247765 nonn,tabf
%O A247765 1,1
%A A247765 _Reinhard Zumkeller_, Sep 25 2014