login
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.
1
1, 8, 15, 23, 30, 38, 45, 52, 60, 67, 74, 82, 89, 97, 104, 111, 119, 126, 134, 141, 148, 156, 163, 170, 178, 185, 193, 200, 207, 215, 222, 230, 237, 244, 252, 259, 267, 274, 281, 289, 296, 303, 311, 318, 326, 333, 340, 348, 355, 363, 370, 377, 385, 392, 400, 407, 414
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.
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