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

A103762 a(n) = least k with Sum_{j = n..k} 1/j >= 1.

Original entry on oeis.org

1, 4, 7, 10, 12, 15, 18, 20, 23, 26, 29, 31, 34, 37, 39, 42, 45, 48, 50, 53, 56, 58, 61, 64, 67, 69, 72, 75, 77, 80, 83, 86, 88, 91, 94, 97, 99, 102, 105, 107, 110, 113, 116, 118, 121, 124, 126, 129, 132, 135, 137, 140, 143, 145, 148, 151, 154, 156, 159, 162
Offset: 1

Views

Author

David W. Wilson, Apr 14 2008

Keywords

Comments

a(n) = A136617(n) + n for n > 1. Also a(n) = A136616(n-1) + 1 for n > 1.
If you compare this to floor(e*n) = A022843, 2,5,8,10,13,16,..., it appears that floor(e*n)-a(n) = 1,1,1,0,1,1,1,1,1,1,0,..., initially consisting of 0's and 1's. The places where the 0's occur are 4, 11, 18, 25, 32, 36, 43, 50, 57, 64, 71, ... whose differences seem to be 4, 7 or 11.
There are some rather sharp estimates on this type of differences between harmonic numbers in Theorem 3.2 of the Sintamarian reference, which may help to uncover such a pattern. - R. J. Mathar, Apr 15 2008
a(n) = round(e*(n-1/2)) with the exception of the terms of A277603; at those values of n, a(n) = round(e*(n-1/2)) + 1. - Jon E. Schoenfield, Apr 03 2018

Crossrefs

Cf. A136616, A136617, A242679 (Bobo numbers).

Programs

  • Mathematica
    i = 0; s = 0; Table[While[s < 1, i++; s = s + 1/i]; s = s - 1/n; i, {n, 100}] (* T. D. Noe, Jun 26 2012 *)
  • PARI
    default(realprecision, 10^5); e=exp(1);
    a(n) = if(n<2, 1, floor(e*n+(1-e)/2+(e-1/e)/(24*n-12))); \\ Jinyuan Wang, Mar 06 2020

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

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)) ).

A225669 Slowest-growing sequence of odd primes whose reciprocals sum to 1.

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 19, 23, 967, 101419, 2000490719, 106298338760698351, 586903266015193517540253132922939, 3494365451928289992209032562272585187947069047023572601254975717
Offset: 1

Views

Author

Jonathan Sondow, May 11 2013

Keywords

Comments

See comments, references, and links in A075442 = slowest-growing sequence of primes whose reciprocals sum to 1.
a(n) = 3, 5, 7, 11, 13, 17, 19, 23, 967, ..., so A225671(2) = 23.

Examples

			Since 1/3 + 1/5 + 1/7 + 1/11 + 1/13 + 1/17 + 1/19 + 1/23 < 1, the first eight odd primes are members. The ninth is not, because adding 1/29 pushes the sum over 1.
		

References

  • Popular Computing (Calabasas, CA), Problem 175: A Sum of a Different Kind, Vol. 5 (No. 50, May 1977), p. PC50-8.

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = Block[{sm = Sum[1/(a[i]), {i, n - 1}]}, NextPrime[ Max[ a[n - 1], 1/(1 - sm)]]]; a[0] = 2; Array[a, 14]

A331028 Partition the terms of the harmonic series into groups sequentially so that the sum of each group is equal to or minimally greater than 1; then a(n) is the number of terms in the n-th group.

Original entry on oeis.org

1, 3, 8, 22, 60, 163, 443, 1204, 3273, 8897, 24184, 65739, 178698, 485751, 1320408, 3589241, 9756569, 26521104, 72091835, 195965925, 532690613, 1448003214, 3936080824, 10699376979, 29083922018, 79058296722, 214902731368, 584166189564, 1587928337892, 4316436745787
Offset: 1

Views

Author

Keywords

Comments

a(n) is equal to A024581(n) through a(10), and grows very similarly for n > 10.
Let b(n) = Sum_{j=1..n} a(n); then for n >= 2 it appears that b(n) = round((b(n-1) + 1/2)*e). Cf. A331030. - Jon E. Schoenfield, Jan 14 2020

Examples

			a(1)=1 because 1 >= 1,
a(2)=3 because 1/2 + 1/3 + 1/4 = 1.0833... >= 1, etc.
		

Crossrefs

Some sequences in the same spirit as this: A002387, A004080, A055980, A115515.

Programs

  • PARI
    default(realprecision, 10^5); e=exp(1);
    lista(nn) = {my(r=1); print1(r); for(n=2, nn, print1(", ", -r+(r=floor(e*r+(e+1)/2+(e-1/e)/(24*(r+1/2)))))); } \\ Jinyuan Wang, Mar 31 2020
  • Python
    x = 0.0
    y = 0.0
    for i in range(1,100000000000000000000000):
      y += 1
      x = x + 1/i
      if x >= 1:
        print(y)
        y = 0
        x = 0
    

Formula

a(n) = min(p): Sum_{b=r+1..p+r} 1/b >= 1, r = Sum_{k=1..n-1} a(k), a(1) = 1.

Extensions

a(20)-a(21) from Giovanni Resta, Jan 14 2020
More terms from Jinyuan Wang, Mar 31 2020

A363993 a(n) = greatest integer k such that 1/n + 1/(n + 1) +...+ 1/k < 2.

Original entry on oeis.org

3, 10, 18, 25, 32, 40, 47, 54, 62, 69, 77, 84, 91, 99, 106, 114, 121, 128, 136, 143, 150, 158, 165, 173, 180, 187, 195, 202, 210, 217, 224, 232, 239, 247, 254, 261, 269, 276, 283, 291, 298, 306, 313, 320, 328, 335, 343, 350, 357, 365, 372, 380, 387, 394, 402
Offset: 1

Views

Author

Clark Kimberling, Sep 06 2023

Keywords

Comments

In general, if r > 0 and n > 1, then a(n) is the number k such that h(k) <= r + h(n-1) < h(k+1), where h(m) = m-th harmonic number. Since h(n) is approximately g + log(n+1/2), where g = Euler-Mascheroni constant (A001620), it is easy to prove that a(n) or a(n)-1 is the number floor[n*e^r-(1+e^r)/2]. Thus, the difference sequence of (a(n)) has at most two distinct numbers. For r = 2, the two numbers are 7 and 8.

Examples

			a(2) = 10 because 1/2 + 1/3 +...+ 1/10 < 2 < 1/2 + 1/3 +...+ 1/11.
		

Crossrefs

Programs

  • Mathematica
    r = 2; h[n_] := HarmonicNumber[n];
    a[n_] : = Select[Range[500], h[#] <= r + h[n - 1] < h[# + 1] & ]
    Flatten[Table[a[n], {n, 1, 70}]]
  • PARI
    a(n) = my(k=0); while (sum(i=n, n+k, 1/i) < 2, k++); n+k-1; \\ Michel Marcus, Sep 08 2023
  • Python
    from itertools import accumulate, count
    from fractions import Fraction
    def A363993(n): return next(x[0]+n-1 for x in enumerate(accumulate(Fraction(1,k) for k in count(n))) if x[1] >= 2) # Chai Wah Wu, Sep 07 2023
    

A364609 a(n) = greatest integer k such that 1/n + 1/(n + 1) + ... + 1/k < sqrt(2).

Original entry on oeis.org

1, 5, 9, 13, 18, 22, 26, 30, 34, 38, 42, 46, 50, 55, 59, 63, 67, 71, 75, 79, 83, 87, 92, 96, 100, 104, 108, 112, 116, 120, 124, 129, 133, 137, 141, 145, 149, 153, 157, 161, 166, 170, 174, 178, 182, 186, 190, 194, 198, 203, 207, 211, 215, 219, 223, 227, 231
Offset: 1

Views

Author

Clark Kimberling, Sep 06 2023

Keywords

Comments

In general, if r > 0 and n > 1, then a(n) is the number k such that h(k) <= r + h(n-1) < h(k+1), where h(m) = m-th harmonic number. Since h(n) is approximately g + log(n+1/2), where g = Euler-Mascheroni constant (A001620), it is easy to prove that a(n) or a(n)-1 is the number floor(n*e^r - (1+e^r)/2). Thus, the difference sequence of (a(n)) has at most two distinct numbers; for r = sqrt(2), the two numbers are 4 and 5.

Examples

			a(3) = 9 because 1/3 + 1/4 + ... + 1/9 < sqrt(2) < 1/3 + 1/4 + ... + 1/10.
		

Crossrefs

Programs

  • Mathematica
    r = Sqrt[2]; h[n_] := HarmonicNumber[n];
    a[n_] : = Select[Range[500], h[#] <= r + h[n - 1] < h[# + 1] & ]
    Flatten[Table[a[n], {n, 1, 70}]]
  • PARI
    a(n) = my(k=0); while (sum(i=n, n+k, 1/i)^2 < 2, k++); n+k-1; \\ Michel Marcus, Sep 08 2023
  • Python
    from itertools import accumulate, count
    from fractions import Fraction
    def A364609(n): return next(x[0]+n-1 for x in enumerate(accumulate(Fraction(1,k) for k in count(n))) if x[1]**2 >= 2) # Chai Wah Wu, Sep 07 2023
    
Showing 1-7 of 7 results.