cp's OEIS Frontend

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.

Showing 1-4 of 4 results.

A056053 a(n) = smallest odd number 2m+1 such that the partial sum of the odd harmonic series Sum_{j=0..m} 1/(2j+1) is > n.

Original entry on oeis.org

1, 3, 15, 113, 837, 6183, 45691, 337607, 2494595, 18432707, 136200301, 1006391657, 7436284415, 54947122715, 406007372211, 3000011249847, 22167251422541, 163795064320249, 1210290918990281, 8942907496445513, 66079645178783351, 488266205223462461, 3607826381608149807
Offset: 0

Views

Author

Robert G. Wilson v, Jul 25 2000 and Jan 11 2004

Keywords

Comments

a(2) = 15 and a(3) = 113 are related to the Borwein integrals. Concretely, a(2) = 15 is the smallest odd m such that the integral Integral_{x=-oo..oo} Product_{1<=k<=m, k odd} (sin(k*x)/(k*x)) dx is slightly less than Pi, and a(3) = 113 is the smallest odd m such that the integral Integral_{x=-oo..oo} cos(x) * Product_{1<=k<=m, k odd} (sin(k*x)/(k*x)) dx is slightly less than Pi/2. See the Wikipedia link and the 3Blue1Brown video link below. - Jianing Song, Dec 10 2022

References

  • Calvin C. Clawson, "Mathematical Mysteries, The Beauty and Magic of Numbers," Plenum Press, NY and London, 1996, page 64.

Crossrefs

Programs

  • Mathematica
    s = 0; k = 1; Do[ While[s = N[s + 1/k, 24]; s <= n, k += 2]; Print[k]; k += 2, {n, 1, 11}]

Formula

a(n) ~ floor((1/2)*A002387(2n)).
The next term is approximately the previous term * e^2.
a(n) = A092315(n)*2 + 1 = floor(exp(n*2-Euler)/4+1/8)*2+1 for all n (conjectured). - M. F. Hasler, Jan 24 2017
a(n) ~ exp(2*n - A350763) = (1/2)*exp(2*n - gamma), gamma = A001620. - A.H.M. Smeets, Apr 15 2022

Extensions

Corrected by N. J. A. Sloane, Feb 16 2004
More terms from Robert G. Wilson v, Apr 17 2004
a(17) corrected - see correction in A092315. - Gerhard Kirchner, Jul 25 2020
a(0) prepended by Robert G. Wilson v, Oct 23 2024

A092315 a(n) is the smallest m such that the partial sum of the odd harmonic series Sum_{j=0..m} 1/(2j+1) is > n.

Original entry on oeis.org

1, 7, 56, 418, 3091, 22845, 168803, 1247297, 9216353, 68100150, 503195828, 3718142207, 27473561357, 203003686105, 1500005624923, 11083625711270, 81897532160124, 605145459495140, 4471453748222756, 33039822589391675, 244133102611731230, 1803913190804074903
Offset: 1

Views

Author

N. J. A. Sloane, Feb 16 2004

Keywords

Comments

From Gerhard Kirchner, May 21 2020: (Start)
The terms a(n), evaluated by the formula, should pass the test OH(a(n))=n and OH(a(n)-1)=n-1, where OH(m) is the odd harmonic series, see above.
Another formula, see link Asymptotic formulas, formula 1, is OH(m) = (log(4*m)+gamma)/2+1/(2*m)-11/(48*m^2)+1/(8*m^3)-127*t/(1920*m^4), 0
The Maxima code includes both tests and creates a b-file in the current directory. For n<=1000, the case "Precision too low" does not occur. (End)
a(2) = 7 and a(3) = 56 are related to the Borwein integrals. Concretely, a(2) = 7 is the smallest m such that the integral Integral_{x=-oo..oo} Product_{k=0..m} (sin((2*k+1)*x)/((2*k+1)*x)) dx is slightly less than Pi, and a(3) = 56 is the smallest m such that the integral Integral_{x=-oo..oo} cos(x) * Product_{k=0..m} (sin((2*k+1)*x)/((2*k+1)*x)) dx is slightly less than Pi/2. See the Wikipedia link and the 3Blue1Brown video link below. - Jianing Song, Dec 10 2022

Crossrefs

Except for first term, same as A092318. Equals (A056053-1)/2.

Programs

  • Mathematica
    A092315[n_] := Floor[Exp[2*n - EulerGamma]/4]; Table[A092315[n], {n, 1, 22}] (* Robert P. P. McKone, Jul 13 2021 *)
  • Maxima
    block(
    fpprec:1000, gam: %gamma, nmax:1000,
    fl: openw("bfile1000.txt"),
    OH(k,t):=(log(4*k)+gam)/2+1/(2*k)-11/(48*k^2)+1/(8*k^3)-127*t/(1920*k^4),
    printf(fl, "1 1"),   newline(fl),
    for n from 2 thru nmax do
    (u: bfloat(exp(2*n-gam)/4), k: floor(u),
    x0: bfloat(OH(k,0)), x01: bfloat(OH(k,1)), x1: bfloat(OH(k-1,0)),
    n0: floor(x0), n01: floor(x01), n1: floor(x1),  m: n,
    if n0=n and n01=n and n1=n-1 then
             (h: concat(n, " ", k), printf(fl, h),  newline(fl)) else n: nmax),
    if mGerhard Kirchner, Jul 23 2020 */
    /* The first nmax terms are saved as a b-file */

Formula

a(n) = floor(exp(2*n-gamma)/4+1/8) for all n >= 1 (conjectured; see also comments in A002387). - M. F. Hasler, Jan 22 2017
a(n) = floor(exp(2*n-gamma)/4). - Gerhard Kirchner, Jul 23 2020

Extensions

More terms from M. F. Hasler, Jan 24 2017
a(17) in the data section and 127 terms in the b-file corrected by Gerhard Kirchner, Jul 23 2020

A092318 a(n) = smallest m such that value of odd harmonic series Sum_{j=0..m} 1/(2j+1) is >= n.

Original entry on oeis.org

0, 7, 56, 418, 3091, 22845, 168803, 1247297, 9216353, 68100150, 503195828, 3718142207, 27473561357, 203003686105, 1500005624923, 11083625711270, 81897532160124, 605145459495140, 4471453748222756, 33039822589391675
Offset: 1

Author

N. J. A. Sloane, Feb 16 2004

Keywords

Crossrefs

Apart from first term, same as A092315. Equals (A092317-1)/2.
Cf. A281355 (= a(n) + 1) for a variant.

Programs

  • Mathematica
    a[n_] := Floor[(Exp[2 n - EulerGamma] + 1/2)/4]; a[1] = 0; Array[a, 20] (* Robert G. Wilson v, Jan 25 2017 *)
  • PARI
    A092318=n->floor(exp(2*n-Euler)/4+1/8)-(n<2) \\ Cf. comments in A092315. - M. F. Hasler, Jan 24 2017

Formula

a(n) = floor(exp(2*n-gamma)/4+1/8), for all n > 1. - M. F. Hasler and Robert G. Wilson v, Jan 22 2017
a(n) = floor(exp(2*n-gamma)/4), for all n > 1, see correction in A092315, Gerhard Kirchner, Jul 25 2020

Extensions

More terms (computed from A092317) from M. F. Hasler, Jan 22 2017
a(17) corrected by Gerhard Kirchner, Jul 26 2020

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.

Original entry on oeis.org

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

Author

Gerhard Kirchner, Nov 12 2020

Keywords

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.

Examples

			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.
		

Crossrefs

Programs

  • 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 *)
  • 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));

Formula

Conjecture: a(n) = ceiling(n*exp(2)+(exp(2)+exp(-2))/(24*n)), verified for n<=3000.
Showing 1-4 of 4 results.