close
login
A395995
Smallest 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.
0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 14, 9, 5, 0, 7, 0, 3, 0, 0, 11, 9, 0, 5, 5, 7, 25, 16, 0, 9, 9, 29, 13, 4, 13, 7, 0, 7, 15, 9, 11, 4, 7, 5, 5, 13, 0, 3, 11, 32, 25, 8, 0, 5, 29, 5, 29, 4, 47, 8, 15, 11, 17, 7, 7, 4, 23, 7, 17, 4, 19, 11
OFFSET
1,17
FORMULA
a(n) = 0 if and only if n is in A396000.
a(n) = 3 if and only if n is in A395997.
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 = 42 there are 2 such fractions, 13/42 and 31/42, so a(42) = 13. For the smaller fraction 10/42 = 5/21, the greedy Egyptian fraction representation also has more terms than the shortest representation, but since 10 and 42 have a common factor it is discarded.
KEYWORD
nonn,new
AUTHOR
STATUS
approved