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.
%I A281873 #29 Jun 20 2025 15:14:29 %S A281873 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, %T A281873 27,28,29,30,200,77706,16532869712,3230579689970657935732, %U A281873 36802906522516375115639735990520502954652700 %N 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. %C A281873 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). %C A281873 A140335 is the same sequence for 3. The sequence for 5 consists of 99 terms, the largest of which has 142548 digits. %D A281873 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. %H A281873 John Scholes, <a href="http://mks.mff.cuni.cz/kalva/putnam/psoln/psol5413.html">14th Putnam Mathematical Competition, 1954, Problem B6</a>, after Gleason, Greenwood & Kelly. %H A281873 <a href="/index/Ed#Egypt">Index entries for sequences related to Egyptian fractions</a> %F A281873 Sum_{k=1..35} 1/a(k) = 4. %t A281873 x0=4-Sum[1/k,{k,1,30}]; %t A281873 Nm=10; %t A281873 j=0; %t A281873 While[x0>0||j==Nm,a0=Ceiling[1/x0]; %t A281873 x0=x0-1/a0; %t A281873 Print[a0];j++] %t A281873 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 *) %o A281873 (Python) %o A281873 from sympy import egyptian_fraction %o A281873 print(egyptian_fraction((4, 1))) # _Pontus von Brömssen_, Feb 10 2019 %Y A281873 Cf. A140335, A306349. %K A281873 nonn,fini,full %O A281873 1,2 %A A281873 _Yuriy Sibirmovsky_, Jan 31 2017