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 A338857 #19 Dec 21 2020 07:40:06 %S A338857 1,8,15,23,30,38,45,52,60,67,74,82,89,97,104,111,119,126,134,141,148, %T A338857 156,163,170,178,185,193,200,207,215,222,230,237,244,252,259,267,274, %U A338857 281,289,296,303,311,318,326,333,340,348,355,363,370,377,385,392,400,407,414 %N A338857 With S(n,k) = Sum_{n<=j<=k} 1/(2*j+1), a(n)=k+1 such that S(n,k-1) < 1 <= S(n,k) for n>=0 and a(0)=1. %C A338857 The following version of the well-known "camel and banana (dates)" problem, is an application of the sequence above: %C A338857 A camel is to bring full water bags from oasis A to oasis B. It can carry the driver, one full and one empty bag. A full bag is just enough to supply the camel with water for one way from A to B. What is the minimum reserve a(n) of full bags at oasis A if n full bags are to be delivered at B and depots may be installed along the way? %C A338857 For details, see link "Transport problem". %C A338857 n=0: The camel carries one bag which is full in A and empty in B. %H A338857 Gerhard Kirchner, <a href="/A338857/a338857.pdf">Transport problem</a> %F A338857 Conjecture: a(n) = ceiling(n*exp(2)+(exp(2)+exp(-2))/(24*n)), verified for n<=3000. %e A338857 n=0: S(0,k-1)=1 for k=1. %e A338857 Thus a(0) = 1+0 = 1. %e A338857 n=1: S(1,6)=1/3+1/5+...+1/11+1/13=0.995<1, S(1,7)=S(1,6)+1/15=1.022>1. %e A338857 Thus a(1) = 7+1 = 8. %e A338857 n=2: S(2,13)=1/5+1/7+...+1/25+1/27=0.968<1, S(2,14)=S(2,13)+1/29=1.003>1. %e A338857 Thus a(2) = 14+1 = 15. %t A338857 Block[{S}, S[n_, k_] := Sum[1/(2 j + 1), {j, n, k}]; {1}~Join~Array[Block[{k = 1}, While[Nand[S[#, k - 1] < 1 <= S[#, k]], k++]; k + 1] &, 56]] (* _Michael De Vlieger_, Nov 12 2020 *) %o A338857 (Maxima) %o A338857 block(su: 0, k: 0, n: 1, nmax: 80, %o A338857 /*program returns the first nmax terms*/ %o A338857 v: makelist(0, i, 0, nmax), v[1]: 1, %o A338857 while n<=nmax do %o A338857 (k: k+1, su: su+1/(2*k+1), %o A338857 if su>1 then %o A338857 (v[n+1]: k+1, su: su-1/(2*n+1), n: n+1)), %o A338857 return(v)); %Y A338857 Cf. A056053, A092315, A092318, A281355. %K A338857 nonn %O A338857 0,2 %A A338857 _Gerhard Kirchner_, Nov 12 2020