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.

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

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

A214075 Triangle read by rows: T(n,k) = floor(A213998(n,k) / A213999(n,k)), 0<=k<=n.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 4, 2, 0, 1, 4, 7, 6, 2, 0, 1, 5, 12, 14, 8, 2, 0, 1, 6, 17, 26, 22, 11, 2, 0, 1, 7, 24, 44, 49, 34, 13, 2, 0, 1, 8, 31, 68, 93, 83, 47, 16, 2, 0, 1, 9, 40, 100, 162, 177, 131, 64, 19, 2, 0, 1, 10, 49, 140, 263, 340, 309
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 03 2012

Keywords

Comments

T(n,0) = 1;
T(n,1) = n - 1 for n > 0, cf. A001477;
T(n,2) = A074148(n-2) for n > 2;
T(n,n-2) = A022819(n) for n > 1;
T(n,n-1) = A055980(n) for n > 0;
T(n,n) = A000007(n).

Examples

			Start of triangle preceded by triangle "A213998/A213999":
. 0:                      1                                 1
. 1:                   1   1/2                             1  0
. 2:               1    3/2   1/3                         1  1  0
. 3:            1   5/2    11/6   1/4                    1 2  1  0
. 4:        1   7/2   13/3    25/12   1/5               1 3  4  2 0
. 5:     1   9/2   47/6   77/12   137/60   1/6         1 4  7  6 2 0
. 6:  1  11/2   37/3   57/4   87/10   49/20   1/7,    1 5 12 14 8 2 0.
		

Programs

  • Haskell
    a214075 n k = a214075_tabl !! n !! k
    a214075_row n = a214075_tabl !! n
    a214075_tabl = zipWith (zipWith div) a213998_tabl a213999_tabl

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

A217693 Numbers of distinct integers obtained from summing up subsets of {1, 1/2, 1/3, ..., 1/n}.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Offset: 1

Views

Author

Michel Marcus, Oct 11 2012

Keywords

Comments

a(n) <= A111233(n).
a(n) <= floor(Sum_{k=1..n} 1/k) = A055980(n). - Joerg Arndt, Oct 13 2012
a(n) <= 4 for n <= 94, a(n) <= 5 for n <= 257, a(n) <= 6 for n <= 689. That is because if there is a term 1/a with p dividing a for a prime p, then there must be another term 1/b with p dividing b. Hence, not all terms from 1/1 to 1/n can be summed up. Cf. the "filter" function in my Sage script. - Manfred Scheucher, Aug 17 2015
a(k) = n for all k such that A101877(n) <= k < A101877(n+1). - Jon E. Schoenfield, May 12 2017

Examples

			1, 1/2 + 1/3 + 1/6 = 1 and 1 + 1/2 + 1/3 + 1/6 = 2 are integers, but only 2 of them are distinct, so a(6)=2.
a(24)=3 because 1 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6 + 1/8 + 1/9 + 1/10 + 1/15 + 1/18 + 1/20 + 1/24 = 3 and Sum_{k=1..n} 1/k < 4 for all n <= 30.
a(65)=4 because the sum of the reciprocals of the integers in { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 22, 24, 26, 27, 28, 30, 33, 35, 36, 40, 42, 45, 48, 52, 54, 56, 60, 63, 65 } is 4 and Sum_{k=1..n} 1/k < 5 for all n <= 82. - _Jon E. Schoenfield_, Apr 30 2018
		

References

  • P. Erdos and R. L. Graham, Old and new problems and results in combinatorial number theory, Université de Genève, 1980.

Crossrefs

Programs

  • PARI
    ufr(n) = {tab = []; for (i=1, 2^n - 1, vb = binary(i); while(length(vb) < n, vb = concat(0, vb););; val = sum(j=1, length(vb), vb[j]/j); if (denominator(val) == 1, tab = concat(tab, val); ); ); return (length(Set(tab))); }

Extensions

a(25)-a(46) from Manfred Scheucher, Aug 17 2015
a(47)-a(87) from Jon E. Schoenfield, Apr 30 2018

A096143 a(n) = ceiling(Sum_{i=1..n} 1/i).

Original entry on oeis.org

1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6
Offset: 1

Views

Author

W. Neville Holmes, Jul 24 2004

Keywords

Examples

			a(4)=3 because the ceiling of 1 + 1/2 + 1/3 + 1/4 is 3.
		

Crossrefs

Programs

  • Mathematica
    Ceiling[HarmonicNumber[Range[110]]] (* Harvey P. Dale, Aug 27 2014 *)
  • PARI
    a(n) = ceil(sum(i=1, n, 1/i)) \\ Michel Marcus, Jul 11 2013

Formula

a(n) = ceiling(A001008(n)/A002805(n)). - Michel Marcus, Jul 11 2013

A238401 Floor(sum(i/(i+1)),i=1..n).

Original entry on oeis.org

0, 0, 1, 1, 2, 3, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63
Offset: 0

Views

Author

Jon Perry, Feb 26 2014

Keywords

Comments

The first numbers which appear twice in the sequence are 0, 1, 7, 26, 77, 220, 608, 1665, 4540, 12356, 33605, 91367, 248383, 675199,... - Giovanni Resta, Feb 26 2014
These numbers appear at roughly exp(n - gamma). - Charles R Greathouse IV, Feb 26 2014

Examples

			a(3) = floor(0/1 + 1/2 + 2/3 + 3/4) = floor(1.91666...) = 1.
		

Crossrefs

Programs

  • JavaScript
    c=0;
    for (i=1;i<50;i++) {
    c+=i/(i+1);
    document.write(Math.floor(c)+", ");
    }
    
  • Mathematica
    Floor[Accumulate[Table[i/(i+1),{i,0,70}]]] (* Harvey P. Dale, May 18 2023 *)
  • PARI
    a(n)=n-ceil(sum(i=2,n,1./i)) \\ Charles R Greathouse IV, Feb 26 2014

Formula

a(n) = n - log n + O(1). - Charles R Greathouse IV, Feb 26 2014

Extensions

a(50)-a(67) from Giovanni Resta, Feb 26 2014

A337904 Numbers k such that the decimal expansion of the k-th harmonic number starts with the digits of k, in the same order.

Original entry on oeis.org

1, 43, 714, 715, 9763, 122968, 122969, 1478366, 17239955, 196746419, 2209316467, 24499118645, 268950072605
Offset: 1

Views

Author

Metin Sariyar, Sep 29 2020

Keywords

Comments

The sequence also includes 196746419, 2209316467, 24499118645, 268950072605, 2928264676792, 31663398162514, 340383084842938, 3640820101879826. - Daniel Suteu, Oct 01 2020

Examples

			1/1 + 1/2 + 1/3 + ... + 1/1478366 = 14.78366... .
		

Crossrefs

Programs

  • Mathematica
    s=0;Do[s=s+(1/n);t=IntegerLength[n];m=IntegerLength[Floor[s]];k = Floor[s (10^(t-m))];If[k==n,Print[n]],{n,1,10^11}]
  • PARI
    lista(nn) = {my(s=0.); for (n=1, nn, s += 1./n; my(d = digits(floor(10^20*s))); if (fromdigits(vector(#Str(n), j, d[j])) == n, print1(n, ", ")););} \\ Michel Marcus, Sep 30 2020

Extensions

a(9) from Jinyuan Wang, Sep 30 2020
a(10)-a(12) from Chai Wah Wu, Oct 12 2020
a(13) from Chai Wah Wu, Oct 14 2020
Showing 1-9 of 9 results.