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-10 of 31 results. Next

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

A194541 Partial sums of A004080.

Original entry on oeis.org

1, 5, 16, 47, 130, 357, 973, 2647, 7197, 19564, 53181, 144561, 392958, 1068172, 2903593, 7892784, 21454811, 58320223, 158530804, 430931404, 1171393005, 3184176320, 8655488630, 23528057461, 63955891057, 173850136486, 472573666887, 1284588411309
Offset: 1

Views

Author

Joseph Foley, Aug 28 2011

Keywords

Comments

The ratio of a(n) to A004080(n+1) converges to e/(e-1), which is approximately equal to 1.581976706. For example, a(21)/A004080(22) = 1171393005/740461601 = 1.581976706716...

Crossrefs

Cf. A004080.

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

A046024 a(n) = smallest k such that Sum_{ i = 1..k } 1/prime(i) exceeds n.

Original entry on oeis.org

1, 3, 59, 361139, 43922730588128390
Offset: 0

Views

Author

Keywords

Comments

The corresponding primes prime(a(n)) are in A016088.
Index m for which the prime harmonic number p[ m ] := Sum[ 1/Prime[ k ],{k,1,m} ] >= n.

Crossrefs

Cf. A024451/A002110 for Sum_{i = 1..n} 1/prime(i).

Programs

  • Mathematica
    Table[m = 1; s = 0; While[(s = s + 1/Prime[m]) <= n, m++];
    m, {n, 0, 4}] (* Robert Price, Mar 27 2019 *)
  • PARI
    a(n)=my(t); forprime(p=2,, t+=1./p; if(t>n, return(primepi(p)))) \\ Charles R Greathouse IV, Apr 29 2015

Formula

From Jonathan Sondow, Apr 17 2013: (Start)
a(n) = A000720(A016088(n)) = A000720(A096232(n))+1.
a(n) = e^(e^(n + O(1))), see comment in A223037. [corrected by Charles R Greathouse IV, Aug 22 2013] (End)
a(n) = A103591(2*n). - Michel Marcus, Aug 22 2013

Extensions

a(4) found by Tomás Oliveira e Silva (tos(AT)det.ua.pt), using the fourth term of A016088. - Dec 14 2005
a(0) from Jonathan Sondow, Apr 16 2013

A019529 Sum of a(n) terms of 1/sqrt(k) first strictly exceeds n.

Original entry on oeis.org

1, 2, 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: 0

Views

Author

Keywords

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 A054040 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

A054040 is another version. See also A002387, A004080.

Programs

Extensions

Edited by N. J. A. Sloane, Sep 01 2009

A056903 Numbers n such that the numerator of the rational number 1 + 1/2 + 1/3 + ... + 1/n is a prime number.

Original entry on oeis.org

2, 3, 5, 8, 9, 21, 26, 41, 56, 62, 69, 79, 89, 91, 122, 127, 143, 167, 201, 230, 247, 252, 290, 349, 376, 459, 489, 492, 516, 662, 687, 714, 771, 932, 944, 1061, 1281, 1352, 1489, 1730, 1969, 2012, 2116, 2457, 2663, 2955, 3083, 3130, 3204, 3359, 3494, 3572
Offset: 1

Views

Author

James R. Buddenhagen, Feb 23 2001

Keywords

Comments

Related to partial sums of the harmonic series and to Wolstenholme's Theorem.
Some of the larger entries may only correspond to probable primes.

Examples

			5 is in this sequence because 1+1/2+1/3+1/4+1/5 = 137/60 and 137 is prime.
		

Crossrefs

Cf. A001008 (numerator of the harmonic number H(n)), A067657 (primes that are the numerator of a harmonic number).

Programs

  • Mathematica
    Select[Range[1000], PrimeQ[Numerator[HarmonicNumber[ # ]]] &]
  • PARI
    isok(n) = isprime(numerator(sum(k=1, n, 1/k))); \\ Michel Marcus, Feb 05 2016
  • Perl
    use ntheory ":all"; for (1..1000) { say if is_prime((harmfrac($))[0]); } # _Dana Jacobsen, Feb 05 2016
    

Extensions

Terms from 201 to 492 computed by Jud McCranie.
More terms from Kamil Duszenko (kdusz(AT)wp.pl), Jun 22 2003
29 more terms from T. D. Noe, Sep 15 2004
Further terms found by Eric W. Weisstein, Mar 07 2005, Mar 29 2005, Nov 28 2005, Sep 23 2006

A055980 a(n) = floor(Sum_{i=1..n} 1/i).

Original entry on oeis.org

1, 1, 1, 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, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 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
Offset: 1

Views

Author

Henry Bottomley, Jul 20 2000

Keywords

Comments

If we choose at random (uniformly) a permutation in the symmetric group S_n then a(n) is the expected number of cycles (rounded down) in the cycle decomposition of the permutation. - Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Oct 17 2001
a(n) = A214075(n,n-1) for n > 0. - Reinhard Zumkeller, Jul 03 2012

Crossrefs

Cf. A002387, A004080 (indices of records).

Programs

  • Haskell
    import Data.Ratio ((%), denominator)
    a055980 = floor . sum . map (1 %) . enumFromTo 1
    a055980_list = map floor $ scanl1 (+) $ map (1 %) [1..]
    -- Reinhard Zumkeller, Jul 03 2012
  • Mathematica
    Floor[HarmonicNumber[Range[110]]] (* Harvey P. Dale, May 22 2021 *)

Formula

a(n) ~ log(n) - Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 25 2001
a(n) = floor[A001008(n)/A002805(n)]. - Lekraj Beedassy, Sep 17 2006

A074631 a(n) is the smallest k such that the sum of the first k terms of the composite-harmonic series, Sum_{j=1..k} 1/(j-th composite), is > n.

Original entry on oeis.org

9, 44, 168, 587, 1940, 6192, 19285, 59010, 178122, 531923, 1574706, 4628338, 13521477, 39299115, 113712434, 327752962, 941457955, 2696114317, 7700146599, 21938239766
Offset: 1

Views

Author

Labos Elemer, Aug 27 2002

Keywords

Examples

			1/4 + 1/6 + 1/8 + 1/9 + 1/10 + 1/12 + 1/14 + 1/15 + 1/16 = 1045/1008, but if 1/16 is not present, the sum is less than 1; 16 is the ninth composite number, so a(1) = 9.
		

Crossrefs

Programs

Formula

a(n) = Min { k : Sum_{j=1..k} 1/A002808(j) > n }.
Limit_{n->oo} a(n+1)/a(n) = e. - Robert G. Wilson v, Aug 28 2002
a(n) = A065855(A076751(n)). - Amiram Eldar, Jul 17 2024

Extensions

Edited by Robert G. Wilson v, Aug 28 2002
More terms from Robert Gerbicz, Aug 30 2002
2 more terms from Robert G. Wilson v, Sep 03 2002
Edited by Jon E. Schoenfield, Sep 13 2023
a(18)-a(20) from Amiram Eldar, Jul 17 2024

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
Showing 1-10 of 31 results. Next