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

A242654 1 followed by the union of the terms > 2 in A002387 (or A004080) and A115515.

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, 91379, 91380, 248396, 248397, 675213, 675214, 1835420, 1835421, 4989190, 4989191, 13562026, 13562027, 36865411, 36865412, 100210580, 100210581, 272400599, 272400600, 740461600, 740461601, 2012783314
Offset: 1

Views

Author

N. J. A. Sloane, May 29 2014

Keywords

Comments

Ray Chandler, May 29 2014, proposes this as the most likely continuation of A079353.

Crossrefs

Programs

  • Mathematica
    b[n_] := Ceiling[k /. FindRoot[HarmonicNumber[k] == n, {k, Exp[n]}, WorkingPrecision -> 100]] - 1;
    bb = Array[b, 22];
    A242654 = Union[bb, bb + 1] // Rest (* Jean-François Alcover, Apr 10 2019 *)

A002387 Least k such that H(k) > n, where H(k) is the harmonic number Sum_{i=1..k} 1/i.

Original entry on oeis.org

1, 2, 4, 11, 31, 83, 227, 616, 1674, 4550, 12367, 33617, 91380, 248397, 675214, 1835421, 4989191, 13562027, 36865412, 100210581, 272400600, 740461601, 2012783315, 5471312310, 14872568831, 40427833596, 109894245429, 298723530401, 812014744422
Offset: 0

Views

Author

Keywords

Comments

From Dean Hickerson, Apr 19 2003: (Start)
For k >= 1, log(k + 1/2) + gamma < H(k) < log(k + 1/2) + gamma + 1/(24k^2), where gamma is Euler's constant (A001620). It is likely that the upper and lower bounds have the same floor for all k >= 2, in which case a(n) = floor(exp(n-gamma) + 1/2) for all n >= 0.
This remark is based on a simple heuristic argument. The lower and upper bounds differ by 1/(24k^2), so the probability that there's an integer between the two bounds is 1/(24k^2). Summing that over all k >= 2 gives the expected number of values of k for which there's an integer between the bounds. That sum equals Pi^2/144 - 1/24 ~ 0.02687. That's much less than 1, so it is unlikely that there are any such values of k.
(End)
Referring to A118050 and A118051, using a few terms of the asymptotic series for the inverse of H(x), we can get an expression which, with greater likelihood than mentioned above, should give a(n) for all n >= 0. For example, using the same type of heuristic argument given by Dean Hickerson, it can be shown that, with probability > 99.995%, we should have, for all n >= 0, a(n) = floor(u + 1/2 - 1/(24u) + 3/(640u^3)) where u = e^(n - gamma). - David W. Cantrell (DWCantrell(AT)sigmaxi.net)
For k > 1, H(k) is never an integer. Hence apart from the first two terms this sequence coincides with A004080. - Nick Hobson, Nov 25 2006

References

  • John H. Conway and R. K. Guy, "The Book of Numbers," Copernicus, an imprint of Springer-Verlag, NY, 1996, pages 258-259.
  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 83, p. 28, Ellipses, Paris 2008.
  • Ronald Lewis Graham, Donald Ervin Knuth and Oren Patashnik, "Concrete Mathematics, a Foundation for Computer Science," Addison-Wesley Publishing Co., Reading, MA, 1989, Page 258-264, 438.
  • H. P. Robinson, Letter to N. J. A. Sloane, Oct 23 1973.
  • W. Sierpiński, Sur les decompositions de nombres rationnels, Oeuvres Choisies, Académie Polonaise des Sciences, Warsaw, Poland, 1974, p. 181.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane, Illustration for sequence M4299 (=A007340) in The Encyclopedia of Integer Sequences (with Simon Plouffe), Academic Press, 1995.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • I. Stewart, L'univers des nombres, pp. 54, Belin-Pour La Science, Paris 2000.

Crossrefs

Apart from initial terms, same as A004080.

Programs

  • Haskell
    a002387 n = a002387_list !! n
    a002387_list = f 0 1 where
       f x k = if hs !! k > fromIntegral x
               then k : f (x + 1) (k + 1) else f x (k + 1)
               where hs = scanl (+) 0 $ map recip [1..]
    -- Reinhard Zumkeller, Aug 04 2014
  • Mathematica
    fh[0]=0; fh[1]=1; fh[k_] := Module[{tmp}, If[Floor[tmp=Log[k+1/2]+EulerGamma]==Floor[tmp+1/(24k^2)], Floor[tmp], UNKNOWN]]; a[0]=1; a[1]=2; a[n_] := Module[{val}, val=Round[Exp[n-EulerGamma]]; If[fh[val]==n&&fh[val-1]==n-1, val, UNKNOWN]]; (* fh[k] is either floor(H(k)) or UNKNOWN *)
    f[n_] := k /. FindRoot[HarmonicNumber[k] == n, {k, Exp[n]}, WorkingPrecision -> 100] // Ceiling; f[0] = 1; Array[f, 28, 0] (* Robert G. Wilson v, Jan 24 2017 after Jean-François Alcover in A014537 *)
  • PARI
    a(n)=if(n,my(k=exp(n-Euler));ceil(solve(x=k-1.5,k+.5,intnum(y=0,1,(1-y^x)/(1-y))-n)),1) \\ Charles R Greathouse IV, Jun 13 2012
    

Formula

Note that the conditionally convergent series Sum_{k>=1} (-1)^(k+1)/k = log 2 (A002162).
Limit_{n->oo} a(n+1)/a(n) = e. - Robert G. Wilson v, Dec 07 2001
It is conjectured that, for n > 1, a(n) = floor(exp(n-gamma) + 1/2). - Benoit Cloitre, Oct 23 2002

Extensions

Terms for n >= 13 computed by Eric W. Weisstein; corrected by James R. Buddenhagen and Eric W. Weisstein, Feb 18 2001
Edited by Dean Hickerson, Apr 19 2003

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

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

A280520 Triangle read by rows: T(n,k) = number of increasing sequences of n positive integers with reciprocals adding up to k (k=1,2,...,A055980(n)).

Original entry on oeis.org

1, 0, 1, 6, 1, 72, 6, 2320, 72, 245765, 2320, 151182379, 245765
Offset: 1

Views

Author

Max Alekseyev, Jan 04 2017

Keywords

Comments

T(n,k) = 0 for all k > A055980(n).
For n=3,...,11, we have T(n,2) = T(n-1,1). However, T(12,2) > T(11,1).
Conjecture: for n in A115515 (i.e., A055980(n+1)=A055980(n)+1), the sequences being enumerated by T(n,A055980(n)) must start with 1. E.g., there is no 10-tuple (x_1,x_2,...,x_10) with 1 < x_1 < ... < x_10 and 1/x_1 + ... + 1/x_10 = 2 (=A055980(10)).

Examples

			Triangle starts with:
n=1: 1
n=2: 0
n=3: 1
n=4: 6, 1
n=5: 72, 6
n=6: 2320, 72
n=7: 245765, 2320
n=8: 151182379, 245765
...
		

Crossrefs

Cf. A280518 (row sums), A006585 (column k=1), A156869 (nondecreasing sequences), A280519 (ordered sequences).

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

A214966 Array T(m,n) = greatest k such that 1/n + ... + 1/(n+k-1) <= m, by rising antidiagonals.

Original entry on oeis.org

1, 3, 2, 10, 9, 4, 30, 29, 16, 6, 82, 81, 48, 22, 7, 226, 225, 134, 67, 28, 9, 615, 614, 370, 188, 86, 35, 11, 1673, 1672, 1012, 517, 241, 105, 41, 12, 4549, 4548, 2756, 1413, 664, 295, 124, 47, 14, 12366, 12365, 7498, 3847, 1814, 811, 348, 143, 54
Offset: 1

Views

Author

Clark Kimberling, Sep 01 2012

Keywords

Comments

Row 1: A136617.
Column 1: A115515 = -1 + A002387.

Examples

			Northwest corner (the array is read by northeast antidiagonals):
    1     2     4     6     7     9
    3     9    16    22    28    35
   10    29    48    67    86   105
   30    81   134   188   241   295
   82   225   370   517   664   811
  226   614  1012  1413  1814  2216
		

Crossrefs

Programs

  • Mathematica
    t = Table[1 + Floor[x /. FindRoot[HarmonicNumber[N[x + z, 150]] - HarmonicNumber[N[z - 1, 150]] == m, {x, Floor[-E^bm/2 + (-1 + E^m) z]}, WorkingPrecision -> 100]], {m, 1, #}, {z, 1, #}] &[12]
    TableForm[t]
    u = Flatten[Table[t[[i - j]][[j]], {i, 2, 12}, {j, 1, i - 1}]]
    (* Peter J. C. Moses, Aug 29 2012 *)

A333099 a(n) is the final term of the lexicographically first sequence of distinct positive multiples of n whose reciprocals sum to 1.

Original entry on oeis.org

1, 12, 173880, 147211626090065500462558943962082011818610800
Offset: 1

Views

Author

Jon E. Schoenfield, Mar 07 2020

Keywords

Comments

a(5) is a 142549-digit number.
Let S_n be the lexicographically first sequence of distinct positive multiples of n whose reciprocals sum to 1, and let S_n(k) be the k-th term in that sequence; then for n > 1, S_n(k) = n*k iff k <= A115515(n). E.g., for n=3, S_3 = {3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 45, 690, 173880}, whose first A115515(3)=10 terms are 3*1, 3*2, ..., 3*10, but the 11th term (45) exceeds 33.

Examples

			For n=2, 1 - (1/2 + 1/4 + 1/6) = 1/12, i.e., 1/2 + 1/4 + 1/6 + 1/12 = 1, so a(2)=12.
For n=3, 1 - (1/3 + 1/6 + 1/9 + ... + 1/30) = 1/42.2346...;
1 - (1/3 + 1/6 + 1/9 + ... + 1/30 + 1/45) = 1/687.272727...;
1 - (1/3 + 1/6 + 1/9 + ... + 1/30 + 1/45 + 1/690) = 1/173880, i.e., 1/3 + 1/6 + 1/9 + ... + 1/30 + 1/45 + 1/690 + 1/173880 = 1, so a(3)=173880.
For n=4, the sum of reciprocals is 1/4 + 1/8 + 1/12 + ... + 1/120 + 1/800 + 1/310824 + 1/66131478848 + 1/12922318759882631742928 + 1/147211626090065500462558943962082011818610800 = 1, so a(4)=147211626090065500462558943962082011818610800.
		

Crossrefs

Cf. A115515.
Showing 1-8 of 8 results.