login
A395996
Largest number k in 1..n such that GCD(n,k) = 1 and the greedy Egyptian fraction representation of k/n has more terms than the shortest representation of k/n as a sum of unit fractions; or 0 if no such k exists.
4
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 17, 19, 17, 0, 19, 0, 16, 0, 0, 25, 27, 0, 30, 21, 7, 25, 34, 0, 30, 15, 31, 33, 39, 31, 32, 0, 22, 37, 42, 35, 44, 33, 41, 49, 44, 0, 53, 39, 53, 47, 54, 0, 59, 61, 61, 61, 63, 47, 66, 65, 64, 67, 70, 71
OFFSET
1,17
FORMULA
a(n) = 0 if and only if n is in A396000.
a(n) = n-1 if and only if n = 1 or n is in A396160.
EXAMPLE
For n = 17, 4/17 is the only fraction for which the greedy Egyptian fraction representation has more terms than the shortest representation, so a(17) = 4.
For n = 38 there are 2 such fractions, 9/38 and 15/38, so a(38) = 15. For the larger fractions 28/38 = 14/19 and 34/38 = 17/19, the greedy Egyptian fraction representations also have more terms than the shortest representations, but since both 28 and 34 have a common factor with 38 they are discarded.
KEYWORD
nonn
AUTHOR
STATUS
approved