OFFSET
0,2
COMMENTS
The following version of the well-known "camel and banana (dates)" problem, is an application of the sequence above:
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?
For details, see link "Transport problem".
n=0: The camel carries one bag which is full in A and empty in B.
LINKS
Gerhard Kirchner, Transport problem
FORMULA
Conjecture: a(n) = ceiling(n*exp(2)+(exp(2)+exp(-2))/(24*n)), verified for n<=3000.
EXAMPLE
n=0: S(0,k-1)=1 for k=1.
Thus a(0) = 1+0 = 1.
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.
Thus a(1) = 7+1 = 8.
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.
Thus a(2) = 14+1 = 15.
MATHEMATICA
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 *)
PROG
(Maxima)
block(su: 0, k: 0, n: 1, nmax: 80,
/*program returns the first nmax terms*/
v: makelist(0, i, 0, nmax), v[1]: 1,
while n<=nmax do
(k: k+1, su: su+1/(2*k+1),
if su>1 then
(v[n+1]: k+1, su: su-1/(2*n+1), n: n+1)),
return(v));
CROSSREFS
KEYWORD
nonn
AUTHOR
Gerhard Kirchner, Nov 12 2020
STATUS
approved