login
A281873
a(n+1) is the smallest number greater than a(n) such that Sum_{j=1..n+1} 1/a(j) <= 4, a(1) = 1.
3
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 200, 77706, 16532869712, 3230579689970657935732, 36802906522516375115639735990520502954652700
OFFSET
1,2
COMMENTS
The method for any number A is to find the largest harmonic number H(n) smaller than A, then use the greedy algorithm to expand the difference A - H(n).
A140335 is the same sequence for 3. The sequence for 5 consists of 99 terms, the largest of which has 142548 digits.
REFERENCES
A. M. Gleason, R. E. Greenwood, and L. M. Kelly, The William Lowell Putnam Mathematical Competition, Problems and Solutions, 1938-1964, MAA, 1980, pages 398-399.
FORMULA
Sum_{k=1..35} 1/a(k) = 4.
MATHEMATICA
x0=4-Sum[1/k, {k, 1, 30}];
Nm=10;
j=0;
While[x0>0||j==Nm, a0=Ceiling[1/x0];
x0=x0-1/a0;
Print[a0]; j++]
f[s_List, n_] := Block[{t = Total[1/s]}, Append[s, Max[ s[[-1]] +1, Ceiling[1/(n - t)]]]]; Nest[f[#, 4] &, {1}, 34] (* Robert G. Wilson v, Feb 05 2017 *)
PROG
(Python)
from sympy import egyptian_fraction
print(egyptian_fraction(4)) # Pontus von Brömssen, Feb 10 2019
CROSSREFS
Sequence in context: A230034 A269331 A246103 * A273888 A192218 A070915
KEYWORD
nonn,fini,full
AUTHOR
Yuriy Sibirmovsky, Jan 31 2017
STATUS
approved