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.

Previous Showing 21-30 of 84 results. Next

A115515 a(n) = largest m such that the harmonic number H(m)= Sum_{i=1..m} 1/i is < n.

Original entry on oeis.org

0, 3, 10, 30, 82, 226, 615, 1673, 4549, 12366, 33616, 91379, 248396, 675213, 1835420, 4989190, 13562026, 36865411, 100210580, 272400599, 740461600, 2012783314, 5471312309, 14872568830, 40427833595, 109894245428
Offset: 1

Views

Author

Artur Jasinski, Jan 23 2006

Keywords

Crossrefs

Apart from the initial values, this is simply A002387(n)-1. Cf. A004080.

Programs

  • Maple
    c:=0: H[0]:=0: for n from 1 to 10^4 do H[n]:=1/n+H[n-1]: if floor(H[n])-floor(H[n-1])=1 then c:=1+c: b[c]:=n-1: else c:=c: fi: od: seq(b[j],j=1..c); # Emeric Deutsch
  • Mathematica
    a[n_] := Ceiling[k /. FindRoot[HarmonicNumber[k] == n, {k, Exp[n]}, WorkingPrecision -> 100]] - 1;
    Array[a, 26] (* Jean-François Alcover, Apr 10 2019 *)

A136616 a(n) = largest m with H(m) - H(n) <= 1, where H(i) = Sum_{j=1 to i} 1/j, the i-th harmonic number, H(0) = 0.

Original entry on oeis.org

1, 3, 6, 9, 11, 14, 17, 19, 22, 25, 28, 30, 33, 36, 38, 41, 44, 47, 49, 52, 55, 57, 60, 63, 66, 68, 71, 74, 76, 79, 82, 85, 87, 90, 93, 96, 98, 101, 104, 106, 109, 112, 115, 117, 120, 123, 125, 128, 131, 134, 136, 139, 142, 144, 147, 150, 153, 155, 158, 161, 163, 166
Offset: 0

Views

Author

Rainer Rosenthal, Jan 13 2008

Keywords

Examples

			a(3) = 9 because H(9) - H(3) = 1/4 + ... + 1/9 < 1 < 1/4 + ... + 1/10 = H(10) - H(3).
		

Crossrefs

Programs

  • Maple
    e:= exp(1):
    A136616 := n -> floor( e*n + (e-1)/2 + (e - 1/e)/(24*(n + 1/2))):
    seq(A136616(n), n=0..50);
  • PARI
    default(realprecision, 10^5); e=exp(1);
    a(n) = floor(e*n+(e-1)/2+(e-1/e)/(24*n+12)); \\ Jinyuan Wang, Mar 06 2020

Formula

a(n) = floor(e*n + (e-1)/2 + (e - 1/e)/(24*(n + 1/2))), after a suggestion by David Cantrell.
a(n) = A103762(n+1) - 1 = A136617(n+1) + n for n > 0. - Jinyuan Wang, Mar 06 2020

Extensions

Definition corrected by David W. Cantrell, Apr 14 2008

A081881 Pack bins of size 1 sequentially with items of size 1/1, 1/2, 1/3, 1/4, ... . Sequence gives values of n for which 1/n starts a new bin.

Original entry on oeis.org

1, 2, 4, 10, 26, 69, 186, 504, 1369, 3720, 10111, 27483, 74705, 203068, 551995, 1500477, 4078718, 11087104, 30137872, 81923228, 222690421, 605335323, 1645472007, 4472856655, 12158484965, 33050188741, 89839727480, 244209698681, 663830786257, 1804479163453, 4905082919846
Offset: 1

Views

Author

Wouter Meeussen, Apr 13 2003

Keywords

Comments

For n >= 3, it appears that a(n) = round((a(n-1) - 1/2)*e). Verified through n = 10000 (using the approximation Sum_{j=1..k} 1/j = log(k) + gamma + 1/(2*k) - 1/(12*k^2) + 1/(120*k^4) - 1/(252*k^6) + 1/(240*k^8) - ... + 7709321041217/(16320*k^32), where gamma is the Euler-Mascheroni constant, A001620). - Jon E. Schoenfield, Mar 30 2018

Examples

			1/1; 1/2+1/3, 1/4+1/5+1/6+1/7+1/8+1/9 are all just less than or equal to 1; so first four terms are 1, 2, 4, 10.
Lower and upper indices of bin contents are {1,1}, {2,3}, {4,9}, {10,25}, {26,68}, {69,185}, {186,503}, {504,1368}, {1369,3719}, {3720,10110}, {10111,27482}, ...
		

Crossrefs

Programs

  • Mathematica
    res ={}; FoldList[If[ #1+#2 > 1, AppendTo[res, #2];#2, #1+#2]&, 0, Table[1/k, {k, 1, 1000}]]; 1/res
    lst = {1, 2}; n = 2; Do[s = 0; While[s = N[s + 1/n, 64]; s < 1, n++ ]; AppendTo[lst, n]; Print@n, {i, 25}]; lst (* Robert G. Wilson v, Aug 19 2008 *)
  • PARI
    default(realprecision, 10^4); e=exp(1);
    A136616(k) = floor(e*k + (e-1)/2 + (e-1/e)/(24*k+12));
    lista(nn) = {my(k=1); print1(k); for(n=2, nn, k=A136616(k-1)+1; print1(", ", k)); } \\ Jinyuan Wang, Feb 20 2020

Formula

a(n) is asymptotic to C*exp(n) where C=0.1688... - Benoit Cloitre, Apr 14 2003
C = 0.16885635666714420373167977550090103410150395689764... (cf. A300897). - Jon E. Schoenfield, Apr 12 2018
a(n) = 1 + (A136616^(n-1))(0), where (f^0)(x)=x, (f^(n+1))(x) = f((f^n)(x)) for any function f. - Rainer Rosenthal, Feb 16 2008, Apr 05 2020

Extensions

a(13)-a(25) from Robert G. Wilson v, Aug 19 2008
More terms from Jinyuan Wang, Feb 20 2020

A054040 a(n) terms of series {1/sqrt(j)} are >= n.

Original entry on oeis.org

1, 3, 5, 7, 10, 14, 18, 22, 27, 33, 39, 45, 52, 60, 68, 76, 85, 95, 105, 115, 126, 138, 150, 162, 175, 189, 202, 217, 232, 247, 263, 280, 297, 314, 332, 351, 370, 389, 409, 430, 451, 472, 494, 517, 540, 563, 587, 612, 637, 662, 688, 715, 741, 769, 797, 825
Offset: 1

Views

Author

Asher Auel, Apr 13 2000

Keywords

Comments

In many cases the first differences have the form {2k, 2k, 2k, 2k+1} (A004524). In such cases the second differences are {0, 0, 1, 1}. See A082915 for the exceptions. In as many as these, the first differences have the form {2k-1, 2k-1, 2k-1, 2k}. - Robert G. Wilson v, Apr 18 2003 [Corrected by Carmine Suriano, Nov 08 2013]
a(100)=2574, a(1000)=250731 & a(10000)=25007302 which differs from Sum{i=4..104}A004524(i)=2625, Sum{i=4..1004}A004524(i)=251250 & Sum{i=4..10004}A004524(i)=25012500. - Robert G. Wilson v, Apr 18 2003
A054040(n) <= A011848(n+2), A054040(10000)=25007302 and A011848(n+2)=25007500. - Robert G. Wilson v, Apr 18 2003

Examples

			Let b(k) = 1 + 1/sqrt(2) + 1/sqrt(3) + ... + 1/sqrt(k):
.k.......1....2.....3.....4.....5.....6.....7
-------------------------------------------------
b(k)...1.00..1.71..2.28..2.78..3.23..3.64..4.01
For A019529 we have:
n=0: smallest k is a(0) = 1 since 1.00 > 0
n=1: smallest k is a(1) = 2 since 1.71 > 1
n=2: smallest k is a(2) = 3 since 2.28 > 2
n=3: smallest k is a(3) = 5 since 3.23 > 3
n=4: smallest k is a(4) = 7 since 4.01 > 4
For this sequence we have:
n=1: smallest k is a(1) = 1 since 1.00 >= 1
n=2: smallest k is a(2) = 3 since 2.28 >= 2
n=3: smallest k is a(3) = 5 since 3.23 >= 3
n=4: smallest k is a(4) = 7 since 4.01 >= 4
		

Crossrefs

See A019529 for a different version.

Programs

  • Mathematica
    f[n_] := Block[{k = 0, s = 0}, While[s < n, k++; s = N[s + 1/Sqrt[k], 50]]; k]; Table[f[n], {n, 1, 60}]
  • PARI
    a(n)=if(n<0,0,t=1;z=1;while(zBenoit Cloitre, Sep 23 2012

Formula

Let f(n) = (1/4)*(n^2-2*zeta(1/2)*n) then we have a(n) = f(n) + O(1). More precisely we claim that for n >= 2 we have a(n) = floor(f(n)+c) where c > Max{a(n)-f(n) : n>=1} = a(153) - f(153) = 1.032880076066608813953... and we believe we can take c = 1.033. - Benoit Cloitre, Sep 23 2012

Extensions

Definition and offset modified by N. J. A. Sloane, Sep 01 2009

A136617 a(n) = largest k such that the sum of k consecutive reciprocals 1/n + ... + 1/(n+k-1) does not exceed 1.

Original entry on oeis.org

1, 2, 4, 6, 7, 9, 11, 12, 14, 16, 18, 19, 21, 23, 24, 26, 28, 30, 31, 33, 35, 36, 38, 40, 42, 43, 45, 47, 48, 50, 52, 54, 55, 57, 59, 61, 62, 64, 66, 67, 69, 71, 73, 74, 76, 78, 79, 81, 83, 85, 86, 88, 90, 91, 93, 95, 97, 98, 100, 102, 103, 105, 107, 109, 110, 112, 114, 115
Offset: 1

Views

Author

Rainer Rosenthal, Jan 13 2008

Keywords

Comments

Heuristic formula from David Cantrell (SeqFan mailing list, January 2008). Think of a ruler with harmonic numbers H(n) as marks. Then A136617(n) gives the number of marks m-n+1 = A136616(n)-n+1:
.............H........H.....H........***.....H.......
..............n-1......n.....n+1..............m......
...........----o-------+------+-----.***.-----+-o----
................\____________..____________/......
...............................\/.....................
............................Length 1..................
The first 23 terms of A083088 are identical to those of A136617 but the limits of A083088(n)/n and A136617(n)/n for n->oo are different.

Examples

			a(3) = 4 because 1/3+1/4+1/5+1/6 < 1 has 4 summands; adding 1/7 exceeds 1.
		

Crossrefs

Programs

  • Maple
    A136617 := proc(n) local t, m; t:= 0; for m from n do t:= t+1/m; if t > 1 then return m-n; fi; od; end proc;[seq(A136617(n),n=1..100)]; # Robert Israel, Jan 2008
  • Mathematica
    Table[Module[{start = Floor[z (E - 1)] - 1},
      NestWhile[# + 1 &, start, HarmonicNumber[# + z] - HarmonicNumber[z] + 1/z <= 1 &]], {z, 1, 100}] (* Peter J. C. Moses, Aug 20 2012 *)

Formula

a(n) = A136616(n-1) - n + 1 with David Cantrell's heuristics: a(n) = floor( (e - 1)*(n - 1/2) + (e - 1/e)/(24*(n - 1/2)) ).

A014537 Number of books required for n book-lengths of overhang in the harmonic book stacking problem. Sum_{i=1..a(n)} 1/i >= 2n and Sum_{i=1..a(n)-1} 1/i < 2n.

Original entry on oeis.org

4, 31, 227, 1674, 12367, 91380, 675214, 4989191, 36865412, 272400600, 2012783315, 14872568831, 109894245429, 812014744422, 6000022499693, 44334502845080, 327590128640500, 2420581837980561, 17885814992891026
Offset: 1

Views

Author

Keywords

Comments

Bisection of A002387. - Robert G. Wilson v, Jan 24 2017

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 259.

Crossrefs

Cf. A002387.

Programs

  • Mathematica
    f[n_] := (k = Floor[ N [ E^(n - EulerGamma) + 1/(2n), 24]] - 2; While[ Floor[ N[ Log[k] + EulerGamma + 1/(2k) - 1/(12k^2) + 1/(120k^4), 24]] < n, k++ ]; k); Table[ f[n], {n, 2, 32, 2} ]
    a[n_] := k /. FindRoot[ HarmonicNumber[k] == 2*n, {k, Exp[2*n]}, WorkingPrecision -> 100] // Ceiling; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jun 25 2013 *)

Formula

a(n) = A002387(2n), n>=1. Least a(n) with H(a(n)) > 2n with the harmonic numbers H(k):= A001008(k)/A002805(k).

Extensions

More terms from Robert G. Wilson v, Dec 06 2001
Title corrected by Jeremy Tan, Sep 12 2020

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

Original entry on oeis.org

8, 62, 454, 3348, 24734, 182760, 1350428, 9978382, 73730824, 544801200, 4025566630, 29745137662, 219788490858, 1624029488844, 12000044999386, 88669005690160, 655180257281000, 4841163675961122, 35771629985782052
Offset: 1

Views

Author

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

Keywords

Comments

Numbers 2*m such that floor(f(m)) = floor(f(m-1)) where f(m) = Sum_{j=1..m} ((2*j-1)/(2*j)). Examples:
floor(f(1))=floor(1/2)=0;
floor(f(2))=floor(1/2+3/4)=floor(1.25)=1, then 2*2=4 is not in the sequence;
floor(f(3))=floor(1/2+3/4+5/6)=floor(2.083..)=2, then 2*3=6 is not in the sequence;
floor(f(4))=floor(1/2+3/4+5/6+7/8)=floor(2.958..)=2, then 2*4=8 is the first term of the sequence. - Philippe Lallouet (philip.lallouet(AT)wanadoo.fr), Aug 15 2007

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 = 2; Do[ While[s = N[s + 1/k, 24]; s <= n, k += 2]; Print[k]; k += 2, {n, 1, 12}]
    (* or assuming that the Mathematica coding in A002387 is correct then *)
    b[n_] := Module[{k = Floor[2a[2n]]}, If[ EvenQ[k], k, k + 1]]; Table[ b[n], {n, 19}] (* Robert G. Wilson v, Apr 17 2004 *)

Formula

a(n) = 2*A002387(2n).
The next term is approximately the previous term * e^2.

A079526 a(n) = floor( exp(H_n)*log(H_n) ) - sigma(n).

Original entry on oeis.org

-1, -2, -1, -2, 2, -2, 4, 0, 4, 2, 10, -3, 13, 6, 9, 4, 20, 2, 23, 4, 17, 16, 31, -3, 29, 21, 26, 13, 42, 3, 46, 18, 36, 32, 41, 1, 57, 38, 45, 14, 65, 14, 69, 32, 41, 51, 78, 5, 75, 42, 66, 43, 90, 27, 78, 33, 76, 70, 103, -2, 107, 76, 71, 51, 98, 41, 120, 65, 98, 53
Offset: 1

Views

Author

N. J. A. Sloane, Jan 22 2003

Keywords

Comments

M. Kaneko has shown that the Riemann hypothesis is equivalent to the assertion that a(n) > 0 for n > 60.

Crossrefs

H_n = sum of harmonic series (see A002387), sigma(n) = A000203.

Programs

  • Magma
    [Floor(Exp(HarmonicNumber(n))*Log(HarmonicNumber(n))) - DivisorSigma(1,n): n in [1..80]]; // G. C. Greubel, Jan 15 2019
    
  • Mathematica
    f[n_] := Floor[Exp[HarmonicNumber[n]]Log[HarmonicNumber[n]]] - DivisorSigma[1, n]; Array[f, 70] (* Robert G. Wilson v, Dec 17 2016 *)
  • PARI
    {h(n) = sum(k=1, n, 1/k)};
    vector(80, n, floor( exp(h(n))*log(h(n))) - sigma(n,1) ) \\ G. C. Greubel, Jan 15 2019
    
  • Sage
    [floor(exp(harmonic_number(n))*log(harmonic_number(n))) - sigma(n,1) for n in (1..80)] # G. C. Greubel, Jan 15 2019

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

A079353 Numbers n such that the best rational approximation to H(n) with denominator <=n is an integer, where H(n) denotes the n-th harmonic number (A001008/A002805).

Original entry on oeis.org

1, 3, 4, 10, 11, 30, 31, 82, 83, 226, 227, 615, 616, 1673, 1674, 4549, 4550, 12366, 12367, 33616, 33617
Offset: 1

Views

Author

Benoit Cloitre, Feb 14 2003

Keywords

Comments

From Robert Israel, May 19 2014: The definition is unclear. For example, how does 10 fit in? H(10) = 7381/2520, and the best approximation with denominator <= 10 is 29/10, which is not an integer. Similarly, I don't see how 31, 82, 227, 616, or 1674 fit the definition, as according to my computations the best approximations in these cases are 125/31, 409/82, 1363/227, 4313/616, 13393/1674.
Response from David Applegate, May 20 2014: I suspect, without deep investigation, that what was meant by "best rational approximation to" is "continued fraction convergent". The continued fraction convergents to H(10)=7381/2520 are 2, 3, 41/14, 495/169, ... The continued fraction convergents to H(31) are 4, 145/36, 149/37, 443/110, ... The continued fraction convergents to H(82) are 4, 5, 499/100, 2001/401, ... I haven't verified that the rest of the terms match this definition.
Response from Ray Chandler, May 20 2014: I confirm that definition matches the listed terms and continues with 4549, 4550 and no others less than 10000.
Added by Ray Chandler, May 29 2014: Except for the beginning terms A079353 appears to be the union of A115515 and A002387 (compare A242654).

Examples

			H(11)=83711/27720 and the best approximation to H(11) among the fractions of form k/11, k>=0, is 33/11=3, an integer. Hence 11 is in the sequence.
		

Crossrefs

See A242654 for the most likely continuation.

Programs

  • Mathematica
    okQ[n_] := Select[Convergents[N[HarmonicNumber[n], 30], 10], Denominator[#] <= n &][[-1]] // IntegerQ;
    Reap[For[n = 1, n <= 40000, n++, If[okQ[n], Print[n]; Sow[n]]]][[2, 1]] // Quiet (* Jean-François Alcover, Apr 10 2019 *)

Extensions

a(16)-a(17) from Ray Chandler, May 20 2014
Edited by N. J. A. Sloane, May 29 2014
a(18)-a(21) from Jean-François Alcover, Apr 10 2019
Previous Showing 21-30 of 84 results. Next