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-9 of 9 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

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

Views

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

A281355 a(n) = A092318(n) + 1: Number of terms of the odd harmonic series 1 + 1/3 + 1/5 + 1/7 + ... required to reach a sum >= n.

Original entry on oeis.org

1, 8, 57, 419, 3092, 22846, 168804, 1247298, 9216354, 68100151, 503195829, 3718142208, 27473561358, 203003686106, 1500005624924, 11083625711271, 81897532160125, 605145459495141, 4471453748222757, 33039822589391676, 244133102611731231, 1803913190804074904, 13329215764452299411
Offset: 1

Views

Author

N. J. A. Sloane, Jan 22 2017, following a suggestion from Jerry Polfer

Keywords

Comments

A different way of listing the sums mentioned in A092318.
A092318 is the main entry for this problem.

Crossrefs

Programs

  • Mathematica
    a[n_]:=Floor[Exp[2*n-EulerGamma]/4+1]-Boole[n==1]; Array[a,23] (* Stefano Spezia, Jun 25 2024 *)

Formula

Lim_{n -> oo} a(n)/exp(2*n) = 1/4e^gamma ~ 0.140364870891721292456...;
a(n) = floor(exp(2*n-gamma)/4+1), for all given values a(n) > 1. - M. F. Hasler and Robert G. Wilson v, Jan 23 2017 [corrected by Gerhard Kirchner, Jul 25 2020]

Extensions

More explicit, self-contained definition by M. F. Hasler, Jan 22 2017
More terms (computed using A056053) from M. F. Hasler, Jan 23 2017
a(17) corrected in data and 127 terms in the b-file, according to the corrections in A092315, Gerhard Kirchner, Jul 27 2020

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

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Feb 16 2004

Keywords

Crossrefs

Except for first term, same as A056053. Equals 2*A092318 + 1. Cf. A074599, A025547

Formula

a(n) ~ C*exp(2n) with C = 0.2807297417834425... - M. F. Hasler, Jan 22 2017

Extensions

More terms (via A056053) from M. F. Hasler, Jan 22 2017
a(17) corrected - see correction in A092315. Gerhard Kirchner, Jul 25 2020

A289183 a(n) is the greatest m such that 2*H(n) > H(m), where H(n) is the n-th harmonic number.

Original entry on oeis.org

3, 10, 21, 35, 53, 74, 99, 128, 160, 196, 235, 277, 324, 374, 427, 484, 545, 609, 676, 748, 822, 901, 983, 1068, 1157, 1250, 1346, 1446, 1549, 1656, 1766, 1880, 1998, 2119, 2244, 2372, 2504, 2639, 2778, 2921, 3067, 3216, 3369, 3526, 3686, 3850, 4018, 4189
Offset: 1

Views

Author

Joseph Wheat, Jun 27 2017

Keywords

Crossrefs

Programs

  • Mathematica
    s = HarmonicNumber@ Range[10^4]; Table[Position[s, k_ /; k < 2 HarmonicNumber@ n][[-1, 1]], {n, 48}] (* Michael De Vlieger, Jun 27 2017 *)
    (* The following program searches for such n that f(n) <> a(n) *)
    f[n_] := Floor[n^2*E^(EulerGamma + 1/n) - (1/2 + (1/6)*E^(EulerGamma))];
    harmonic[n_] := Log[n] + EulerGamma + 1/(2 n) - Sum[BernoulliB[2 k]/(2 k*n^(2 k)), {k, 1, 10}];
    Select[Range[100000], 2*harmonic[#] < harmonic[f[#]] &]
    (* Vaclav Kotesovec, Jul 17 2017 *)
  • PARI
    a(n) = {my(m=1); hn = sum(k=1, n, 1/k); hm = 1; until(hm > 2*hn, m++; hm+=1/m); m--;} \\ Michel Marcus, Jul 19 2017
    
  • Python
    from sympy import harmonic
    def a(n):
      hn2 = 2 * harmonic(n)
      m = n
      while harmonic(m) <= hn2: m += 1
      return m - 1
    print([a(n) for n in range(1, 49)]) # Michael S. Branicky, Mar 10 2021

Formula

From Jon E. Schoenfield, Jul 13 2017: (Start)
It seems that, for the vast majority of values of n > 1, f(n) = floor(n^2 * exp(gamma + 1/n) - C), where gamma is the Euler-Mascheroni constant (A001620) and C = 1/2 + (1/6)*exp(gamma) = 0.7968454029983663308727506838511965915282742..., is equal to a(n); f(n) = a(n) for all n in [2..10000] except n=66: f(66)=7876, but a(66)=7875. [Thanks to Vaclav Kotesovec for identifying the value of C.]
Is there any n > 66 at which f(n) and a(n) differ?
(End)
From Vaclav Kotesovec, Jul 17 2017: (Start)
f(39087) = 2721180603, but a(39087) = 2721180602;
f(517345) = 476697560917, but a(517345) = 476697560916;
f(2013005) = 7217245877275, but a(2013005) = 7217245877274;
No other such numbers below 10000000.
(End)
After 2013005, the only other numbers n < 4*10^9 at which f(n) and a(n) differ are 10240491 and 80968833. - Jon E. Schoenfield, Aug 05 2017

Extensions

More terms from Michael De Vlieger, Jun 27 2017

A092267 Values 2m_0+1 = 1, 2m_1, 2m_2+1, ... associated with divergent series T shown below.

Original entry on oeis.org

1, 454, 45891, 547208496, 3013267310449, 1961694770407970734, 589785633779065944213245, 20963601300674244910397534828794, 344117353602393170461608383214200982125
Offset: 0

Views

Author

N. J. A. Sloane, Feb 16 2004

Keywords

Comments

T = 1
- (1/2 + 1/4 + 1/6 + ... + 1/(2m_1))
+ (1/3 + 1/5 + 1/7 + ... + 1/(2m_2+1))
- (1/(2m_1+2) + 1/(2m_1+4) + ... + 1/(2m_3)
+ (1/(2m_2+3) + 1/(2m_2+5) + ... + 1/(2m_4+1))
- (1/(2m_3+2) + 1/(2m_3+4) + ... + 1/(2m_5)
+ (1/(2m_4+3) + 1/(2m_4+5) + ... + 1/(2m_6+1))
- ...
where the partial sums of the terms from 1 through the end of rows 0, 1, ... are respectively 1, just < -2, just > 3, just < -4, just > 5, etc.
Every positive number appears exactly once as a denominator in T.
The series T is a divergent rearrangement of the conditionally convergent series Sum_{ j>=1} (-1)^j/j which has the entire real number system as its set of limit points.

Examples

			1 - (1/2 + 1/4 + 1/6 + ... + 1/454) = -2.002183354..., which is just less than -2; so a(1) = 2m_1 = 454.
1 - (1/2 + 1/4 + 1/6 + ... + 1/454) + (1/3 + 1/5 + ... + 1/45891) = 3.000021113057..., which is just greater than 3; so a(1) = 2m_2 + 1 = 45891.
		

References

  • B. R. Gelbaum and J. M. H. Olmsted, Counterexamples in Analysis, Holden-Day, San Francisco, 1964; see p. 55.

Crossrefs

Cf. A092324 (essentially the same), A002387, A056053, A092318, A092317, A092315.
Cf. A092273.

Extensions

a(2) and a(3) from Hugo Pfoertner, Feb 17 2004
a(4) onwards from Hans Havermann, Feb 18 2004

A092324 Values m_0 = 0, m_1, m_2, ... associated with divergent series T shown below.

Original entry on oeis.org

0, 227, 22945, 273604248, 1506633655224, 980847385203985367, 294892816889532972106622, 10481800650337122455198767414397, 172058676801196585230804191607100491062
Offset: 0

Views

Author

N. J. A. Sloane, Feb 16 2004

Keywords

Comments

T = 1
- (1/2 + 1/4 + 1/6 + ... + 1/(2m_1))
+ (1/3 + 1/5 + 1/7 + ... + 1/(2m_2+1))
- (1/(2m_1+2) + 1/(2m_1+4) + ... + 1/(2m_3)
+ (1/(2m_2+3) + 1/(2m_2+5) + ... + 1/(2m_4+1))
- (1/(2m_3+2) + 1/(2m_3+4) + ... + 1/(2m_5)
+ (1/(2m_4+3) + 1/(2m_4+5) + ... + 1/(2m_6+1))
- ...
where the partial sums of the terms from 1 through the end of rows 0, 1, ... are respectively 1, just < -2, just > 3, just < -4, just > 5, etc.
Every positive number appears exactly once as a denominator in T.
The series T is a divergent rearrangement of the conditionally convergent series Sum_{j>=1} (-1)^j/j which has the entire real number system as its set of limit points.
Comment from Hans Havermann: I calculated these with Mathematica. I used NSum[1/(2i), {i, 1, x}] for the even denominators, where I had to adjust the options to obtain maximal accuracy and N[(EulerGamma + Log[4] - 2)/2 + PolyGamma[0, 3/2 + y]/2, precision] for the odd denominators. The precision needed for the last term shown was around 45 digits.

Examples

			1 - (1/2 + 1/4 + 1/6 + ... + 1/454) = -2.002183354..., which is just less than -2; so a(1) = m_1 = 227.
1 - (1/2 + 1/4 + 1/6 + ... + 1/454) + (1/3 + 1/5 + ... + 1/45891) = 3.000021113057..., which is just greater than 3; so a(2) = m_2 = 22945.
		

References

  • B. R. Gelbaum and J. M. H. Olmsted, Counterexamples in Analysis, Holden-Day, San Francisco, 1964; see p. 55.

Crossrefs

Cf. A092267 (essentially the same), A002387, A056053, A092318, A092317, A092315.
Cf. A092273.

Extensions

a(2) and a(3) from Hugo Pfoertner, Feb 17 2004
a(4) onwards from Hans Havermann, Feb 18 2004

A337748 T(m,n) is the least k such that the partial sum of the series Sum_{j=0..k} 1/(m*j+1) is > n, read by ascending antidiagonals.

Original entry on oeis.org

1, 1, 3, 1, 7, 10, 1, 17, 56, 30, 1, 43, 353, 418, 82, 1, 111, 2374, 7100, 3091, 226, 1, 289, 16497, 129644, 142624, 22845, 615, 1, 762, 116759, 2448436, 7078315, 2864677, 168803, 1673, 1, 2021, 835695, 47104189, 363380155, 386462913, 57538579, 1247297, 4549, 1, 5389, 6025478, 916451548, 19003186159, 53930396770, 21100160132, 1155693253, 9216353, 12366
Offset: 1

Views

Author

Gerhard Kirchner, Sep 18 2020

Keywords

Comments

H(m,k) = Sum_{j=0..k} 1/(m*j+1) may be thought of as a generalized harmonic sequence: H(1,k) = H(k+1), where H(k) = Sum_{j=1..k} 1/j is the harmonic and H(2,k) the odd harmonic sequence. As a consequence, T(1,n) = A002387(n)-1 and T(2,n) = A092315(n). For m > 2, the sequence T(m,n) is not currently in the OEIS. Therefore, I give a detailed derivation of the formulas below, see link "Generalized harmonic series". The parameter c(m) in the formula for T(m,n): c(1) = gamma (Euler's constant), c(2) = gamma+1-log(2). For m > 2, c(m) has to be determined individually. The algorithm is described in the formula section though it is not only one formula.
In the Maxima code, two tests are implemented, see Formula. The first test will probably be passed without exception, the second one limits the terms. For greater T(m,n), the precision must be increased.

Examples

			T(m,n) begins:
m=1: 1   3    10      30        82 ...
m=2: 1   7    56     418      3091 ...
m=3: 1  17   353    7100    142624 ...
m=4: 1  43  2374  129644   7078315 ...
m=5: 1 111 16497 2448436 363380155 ...
     .............................
Evaluation of c(3):
1. S(3,99) = 0.1472791427382, see formulas (P1) and (P2).
2. F(3,100) = 10^(-2)/9 + 10^(-4)/27 + 10^(-6)/243 - 10^(-8)/243 ..., see (P5) = 0.001114818889, see formulas (P3) and (P4).
The next summand is 10^(-10)/729 ~ 10^(-13), the precision is approximately  p = 13 digits.
3. beta(3) = 0.1483939616270.
4. c(3) = 3.1320337800204.
Evaluation of T(3,5):
5. Summing up directly with k = 142624: H(3,k-1) = 4.9999999, H(3,k) = 5.0000022. => T(3,5) = 142624.
6. Using the formula with k1 = exp(3*5-c(3))-5/6 = 142623.0446139:
   T(3,5) = floor(k1+1) = 142624.
7,1. floor(k1) = floor(k2) is satisfied with k2 = k1-1/(24*k1) = 142623.0446136.
7,2. With d = 0.0446 and p = 13, k1 < d*10^(-13) is satisfied, too.
		

Crossrefs

Programs

  • Maxima
    block(p:100, km: 100, eps:10^(-p), lim:10^(p), cc:[],
    /*"harm-bfile.txt" with terms < lim is saved*/
    gam: bfloat(%gamma),
    fpprec:p, load(newton1),
    fl: openw("harm-bfile.txt"),
    c(m):= block(x:0, delta: 1, r:0,
    if m=1 then return(gam) else
      (for k from 1 thru km-1 do x: x+bfloat(1/(m*k*(m*k+1))),
       while delta=0 or delta >eps do
          (r: r+1, su:0,
          for j from 1 thru r-1 do su: su+a[r-j]*(-1)^j*binomial(r,j+1),
          ar: bfloat(-((-1)^r/m^(r+1)+su)/r),  ad: ar/km^r, a: append(a,[ar]),
          x: x+bfloat(ad), delta: abs(ad)), return(gam+m*(1-x)))),
    mn:0, ok: true,  nr:0,
    while ok do (mn: mn+1, a:[], cc: append(cc, [c(mn)]), m:mn+1,
       while m>1 and ok do  (m: m-1, n: mn+1-m,
       k1: exp(m*n-cc[m])-(m+2)/(2*m), k2: k1-1/(24*k1),
       ka: floor(k1+1), kb: floor(k2+1),
       if ka>1 then
         (d: kb-k2, if d>1-d then d: 1-d, if ka#kb or kb> d*lim then  ok: false),
      if ok then (nr: nr+1,  printf(fl, concat(nr, " ", ka)), newline(fl) ) ) ),
    close(fl));

Formula

T(m,n) = floor(k1+1) with k1 = exp(m*n-c(m))-(m+2)/(2*m).
For avoiding bad terms, k1 has to pass two tests:
Test 1: floor(k1) = floor(k2) with k2 = k1-1/(24*k1).
Test 2: k1 < d*10^p, where p is the precision of c(m) (number of digits) and d the distance between k1 and the next integer floor(k1) or floor(k1)+1.
The parameter c(m):
c(m) = gamma+m*(1-beta(m)) with (P1) beta(m) = lim_{k->oo} S(m,k) and S(m,k) = Sum_{j=1..k}(1/(m*j)-1/(m*j+1)).
For faster convergence, the infinite sum must be split up: (P2) beta(m) = S(m,k-1) + F(m,k).
F(m,k) can be written as:
(P3) F(m,k) = Sum_{r=1..s-1} b(r)/k^r + R(s) with R(s) ~ b(s)/k^s.
Example: For the precision p = 100 digits, k = 100 is large enough to find s with b(s)/k^s < 10^(-p) where s >= 73.
The coefficients b(r) are defined by the recurrence b(1) = 1/m^2 and, for r>1: (P4) b(r) = ((-1/m)^(r+1)-Sum_{j=1..r-1} (-1)^j*b(r-j)*binomial(r,j+1))/r.
1 m-1 m^2-3*m+2 m^2-2*m+1
(P5) b(1) = -----, b(2) = -----, b(3) = -----------, b(4) = -----------,
m^2 2*m^3 6*m^4 4*m^5

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

Views

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-9 of 9 results.