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 30 results. Next

A124878 Primes in A027612.

Original entry on oeis.org

5, 13, 223, 4861, 197698279, 25472027467, 6975593267347, 218572480850557, 1592457339642613, 2955634782407818711841368777079578319, 2950127241932882597818337002939124083061, 232242878286351670588710938679161483012314573381293769
Offset: 1

Views

Author

Alexander Adamchuk, Nov 11 2006

Keywords

Examples

			A027612(n) begins {1, 5, 13, 77, 87, 223, 481, 4609, 4861, ...}.
Thus a(1) = 5, a(2) = 13, a(3) = 223, a(4) = 4861.
		

Crossrefs

A027612(n) are the numerators of second order harmonic numbers H(n, (2)).
Corresponding numbers n such that A027612(n) is prime are listed in A124879.

Programs

  • Mathematica
    s=1;Do[s=s+1/(n+1);f=Numerator[(n+1)*(s-1)]; If[PrimeQ[f],Print[{n,f}]],{n,1,1942}]
  • PARI
    lista(nn) = {for (n=1, nn, if (isprime(p=numerator(sum(k=1, n, k/(n-k+1)))), print1(p, ", ")););} \\ Michel Marcus, Jul 14 2018

Formula

a(n) = A027612(A124879(n)).

Extensions

a(12) from, and crossrefs edited by Michel Marcus, Jul 14 2018

A124879 Numbers k such that A027612(k) is prime.

Original entry on oeis.org

2, 3, 6, 9, 18, 25, 29, 30, 39, 84, 91, 125, 130, 184, 195, 199, 203, 241, 245, 273, 281, 378, 552, 571, 653, 776, 901, 1099, 1215, 1224, 1235, 1315, 1412, 1657, 1942, 2076, 2085, 2743, 2745, 2855, 2859, 3517, 3717, 4183, 4188, 4362, 4547, 4728, 4783
Offset: 1

Views

Author

Alexander Adamchuk, Nov 11 2006

Keywords

Examples

			A027612 begins {1, 5, 13, 77, 87, 223, 481, 4609, 4861, ...}.
Thus a(1) = 2, a(2) = 3, a(3) = 6, a(4) = 9.
		

Crossrefs

A027612(n) are the numerators of second order harmonic numbers H(n, (2)).
Corresponding primes in A027612 are listed in A124878.

Programs

  • Mathematica
    s=1;Do[s=s+1/(n+1);f=Numerator[(n+1)*(s-1)]; If[PrimeQ[f],Print[{n,f}]],{n,1,1942}]
  • PARI
    isok(n) = isprime(numerator(sum(k=1, n, k/(n-k+1)))); \\ Michel Marcus, Jul 14 2018

Extensions

More terms from Stefan Steinerberger, May 29 2007
Crossrefs edited by Michel Marcus, Jul 14 2018

A081525 Erroneous version of A027612.

Original entry on oeis.org

1, 5, 13, 77, 87, 223, 481, 4609, 4861, 55991, 58301
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A001705.

Formula

a(n) = A001705(n) / gcd(A001705(n), n!). Note: A001705 starts with n=0. - Martin Fuller, Jan 03 2006

Extensions

Corrected and extended by Martin Fuller, Jan 03 2006

A002805 Denominators of harmonic numbers H(n) = Sum_{i=1..n} 1/i.

Original entry on oeis.org

1, 2, 6, 12, 60, 20, 140, 280, 2520, 2520, 27720, 27720, 360360, 360360, 360360, 720720, 12252240, 4084080, 77597520, 15519504, 5173168, 5173168, 118982864, 356948592, 8923714800, 8923714800, 80313433200, 80313433200, 2329089562800, 2329089562800, 72201776446800
Offset: 1

Views

Author

Keywords

Comments

H(n)/2 is the maximal distance that a stack of n cards can project beyond the edge of a table without toppling.
If n is not in {1, 2, 6} then a(n) has at least one prime factor other than 2 or 5. E.g., a(5) = 60 has a prime factor 3 and a(7) = 140 has a prime factor 7. This implies that every H(n) = A001008(n)/A002805(n), n not from {1, 2, 6}, has an infinite decimal representation. For a proof see the J. Havil reference. - Wolfdieter Lang, Jun 29 2007
a(n) = A213999(n,n-1). - Reinhard Zumkeller, Jul 03 2012
From Wolfdieter Lang, Apr 16 2015: (Start)
a(n)/A001008(n) = 1/H(n) is the solution of the following version of the classical cistern and pipes problem. A cistern is connected to n different pipes of water. For the k-th pipe it takes k time units (say, days) to fill the empty cistern, for k = 1, 2, ..., n. How long does it take for the n pipes together to fill the empty cistern? 1/H(n) gives the answer as a fraction of the time unit.
In general, if the k-th pipe needs d(k) days to fill the empty cistern then all pipes together need 1/Sum_{k=1..n} 1/d(k) = HM(d(1), ..., d(n))/n days, where HM denotes the harmonic mean HM. For the described problem, HM(1, 2, ..., n)/n = A102928(n)/(n*A175441(n)) = 1/H(n).
For a classical cistern and pipes problem see, e.g., the Hunger-Vogel reference (in Greek and German) given in A256101, problem 27, p. 29, where n = 3, and d(1), d(2) and d(3) are 6, 4 and 3 days. On p. 97 of this reference one finds remarks on the history of such problems (called in German 'Brunnenaufgabe'). (End)
From Wolfdieter Lang, Apr 17 2015: (Start)
An example of the above mentioned cistern and pipes problems appears in Chiu Chang Suan Shu (nine books on arithmetic) in book VI, problem 26. The numbers are there 1/2, 1, 5/2, 3 and 5 (days) and the result is 15/75 (day). See the reference (in German) on p. 68.
A historical account on such cistern problems is found in the Johannes Tropfke reference, given in A256101, section 4.2.1.2 Zisternenprobleme (Leistungsprobleme), pp. 578-579.
In Fibonacci's Liber Abaci such problems appear on p. 281 and p. 284 of L. E. Sigler's translation. (End)
All terms > 1 are even while corresponding numerators (A001008) are all odd (proof in Pólya and Szegő). - Bernard Schott, Dec 24 2021

Examples

			H(n) = [ 1, 3/2, 11/6, 25/12, 137/60, 49/20, 363/140, 761/280, 7129/2520, ... ] = A001008/A002805.
		

References

  • Chiu Chang Suan Shu, Neun Bücher arithmetischer Technik, translated and commented by Kurt Vogel, Ostwalds Klassiker der exakten Wissenschaften, Band 4, Friedr. Vieweg & Sohn, Braunschweig, 1968, p. 68.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 258-261.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 259.
  • J. Havil, Gamma, (in German), Springer, 2007, p. 35-6; Gamma: Exploring Euler's Constant, Princeton Univ. Press, 2003.
  • D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 1, p. 615.
  • G. Pólya and G. Szegő, Problems and Theorems in Analysis, volume II, Springer, reprint of the 1976 edition, 1998, problem 251, p. 154.
  • L. E. Sigler, Fibonacci's Liber Abaci, Springer, 2003, pp. 281, 284.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A001008 (numerators), A075135, A025529, A203810, A203811, A203812.
Partial sums: A027612/A027611 = 1, 5/2, 13/3, 77/12, 87/10, 223/20,...
The following fractions are all related to each other: Sum 1/n: A001008/A002805, Sum 1/prime(n): A024451/A002110 and A106830/A034386, Sum 1/nonprime(n): A282511/A282512, Sum 1/composite(n): A250133/A296358, Sum 1/n^2: A007406/A007407, Sum 1/n^3: A007408/A007409.

Programs

  • GAP
    List([1..30],n->DenominatorRat(Sum([1..n],i->1/i))); # Muniru A Asiru, Dec 20 2018
    
  • Haskell
    import Data.Ratio ((%), denominator)
    a002805 = denominator . sum . map (1 %) . enumFromTo 1
    a002805_list = map denominator $ scanl1 (+) $ map (1 %) [1..]
    -- Reinhard Zumkeller, Jul 03 2012
    
  • Magma
    [Denominator(HarmonicNumber(n)): n in [1..40]]; // Vincenzo Librandi, Apr 16 2015
    
  • Maple
    seq(denom(sum((2*k-1)/k, k=1..n), n=1..30); # Gary Detlefs, Jul 18 2011
    f:=n->denom(add(1/k, k=1..n)); # N. J. A. Sloane, Nov 15 2013
  • Mathematica
    Denominator[ Drop[ FoldList[ #1 + 1/#2 &, 0, Range[ 30 ] ], 1 ] ] (* Harvey P. Dale, Feb 09 2000 *)
    Table[Denominator[HarmonicNumber[n]], {n, 1, 40}] (* Stefan Steinerberger, Apr 20 2006 *)
    Denominator[Accumulate[1/Range[25]]] (* Alonso del Arte, Nov 21 2018 *)
  • PARI
    a(n)=denominator(sum(k=2,n,1/k)) \\ Charles R Greathouse IV, Feb 11 2011
    
  • Python
    from fractions import Fraction
    def a(n): return sum(Fraction(1, i) for i in range(1, n+1)).denominator
    print([a(n) for n in range(1, 30)]) # Michael S. Branicky, Dec 24 2021
  • Sage
    def harmonic(a, b): # See the F. Johansson link.
        if b - a == 1 : return 1, a
        m = (a+b)//2
        p, q = harmonic(a,m)
        r, s = harmonic(m,b)
        return p*s+q*r, q*s
    def A002805(n) : H = harmonic(1,n+1); return denominator(H[0]/H[1])
    [A002805(n) for n in (1..29)] # Peter Luschny, Sep 01 2012
    

Formula

a(n) = Denominator(Sum_{k=1..n} (2*k-1)/k). - Gary Detlefs, Jul 18 2011
a(n) = n! / gcd(Stirling1(n+1, 2), n!) = n! / gcd(A000254(n),n!). - Max Alekseyev, Mar 01 2018
a(n) = the (reduced) denominator of the continued fraction 1/(1 - 1^2/(3 - 2^2/(5 - 3^2/(7 - ... - (n-1)^2/(2*n-1))))). - Peter Bala, Feb 18 2024

Extensions

Definition edited by Daniel Forgues, May 19 2010

A027611 Denominator of n * n-th harmonic number.

Original entry on oeis.org

1, 1, 2, 3, 12, 10, 20, 35, 280, 252, 2520, 2310, 27720, 25740, 24024, 45045, 720720, 680680, 4084080, 3879876, 739024, 235144, 5173168, 14872858, 356948592, 343219800, 2974571600, 2868336900, 80313433200, 77636318760
Offset: 1

Views

Author

Glen Burch (gburch(AT)erols.com)

Keywords

Comments

This is very similar to A128438, which is a different sequence. They differ at n=6 (and nowhere else?). - N. J. A. Sloane, Nov 21 2008
Denominator of 1/n + 2/(n-1) + 3/(n-2) + ... + (n-1)/2 + n.
Denominator of Sum_{k=1..n} frac(n/k) where frac(x/y) denotes the fractional part of x/y. - Benoit Cloitre, Oct 03 2002
Denominator of Sum_{d=2..n-1, n mod d > 0} n/d. Numerator = A079076. - Reinhard Zumkeller, Dec 21 2002
a(n) is odd iff n is a power of 2. - Benoit Cloitre, Oct 03 2002
Indices where a(n) differs from A128438 are terms of A074791. - Gary Detlefs, Sep 03 2011

Crossrefs

Programs

  • Haskell
    import Data.Ratio ((%), denominator)
    a027611 n = denominator $ sum $ map (n %) [1..n]
    -- Reinhard Zumkeller, Jul 03 2012
    
  • Magma
    [Denominator(n*HarmonicNumber(n)): n in [1..40]]; // Vincenzo Librandi, Feb 19 2014
    
  • Maple
    a := n -> denom(add((n-j)/j, j=1..n));
    seq(a(n), n = 1..30); # Peter Luschny, May 12 2023
  • Mathematica
    a[n_]:=Denominator[n*HarmonicNumber[n]]; Array[a,100] (* Vladimir Joseph Stephan Orlovsky, Feb 16 2011 *)
  • PARI
    a(n) = denominator(n*sum(k=1, n, 1/k)); \\ Michel Marcus, Feb 15 2015
    
  • Python
    from sympy import harmonic
    def A027611(n): return (n*harmonic(n)).q # Chai Wah Wu, Sep 26 2021
    
  • SageMath
    [denominator(n*harmonic_number(n)) for n in (1..40)] # G. C. Greubel, Aug 24 2022

Formula

From Vladeta Jovovic, Sep 02 2002: (Start)
a(n) = denominators of coefficients in expansion of -log(1-x)/(1-x)^2.
a(n) = denominators of (n+1)*(harmonic(n+1) - 1).
a(n) = denominators of (n+1)*(Psi(n+2) + Euler-gamma - 1). (End)
a(n) = numerator(h(n)/h(n-1)) - denominator(h(n)/h(n-1)), n > 1, where h(n) is the n-th harmonic number. - Gary Detlefs, Sep 03 2011
a(n) = A213999(n, n-2) for n > 1. - Reinhard Zumkeller, Jul 03 2012
a(n) = denominators of coefficients of e.g.f. -1 + exp(x)*(1 + Sum_{j >= 0} (-x)^(j+1)/(j * j!)). - G. C. Greubel, Aug 24 2022

Extensions

Entry revised by N. J. A. Sloane following a suggestion of Eric W. Weisstein, Jul 02 2004

A064169 Numerator - denominator in n-th harmonic number, 1 + 1/2 + 1/3 + ... + 1/n.

Original entry on oeis.org

0, 1, 5, 13, 77, 29, 223, 481, 4609, 4861, 55991, 58301, 785633, 811373, 835397, 1715839, 29889983, 10190221, 197698279, 40315631, 13684885, 13920029, 325333835, 990874363, 25128807667, 25472027467, 232222818803, 235091155703, 6897956948587, 6975593267347
Offset: 1

Views

Author

Leroy Quet, Sep 19 2001

Keywords

Comments

The numerator and denominator in the definition have no common factors greater than 1. p divides a(p-2) for prime p > 2. - Alexander Adamchuk, Jun 09 2006
It appears that a(n) = numerator((3*(HarmonicNumber(n) - 1)) / (n*(n^2 + 6*n + 11))), except for n = 5, 82, 115, and 383 (tested to 20000). - Gary Detlefs, Jul 20 2011
From Amiram Eldar and Thomas Ordowski, Jul 27 2019: (Start)
Conjecture: for n > 2, n divides a(n-2) if and only if n is a prime. Checked up to 20000.
Max Alekseyev proved (in priv. commun.) that there are no primes p > 3 such that p^2 divides a(p-2). (End)

Examples

			The 3rd harmonic number is 11/6. So a(3) = 11 - 6 = 5.
		

Crossrefs

Programs

  • GAP
    List([1..35], n-> NumeratorRat(Sum([0..n-2], k-> 2/(k+2))) ); # G. C. Greubel, Jul 27 2019
    
  • Magma
    [Numerator(a)-Denominator(a) where a is HarmonicNumber(n): n in [1..35]]; // Marius A. Burtea, Aug 03 2019
    
  • Maple
    s := n -> add(1/i, i=2..n): a := n -> numer(s(n)):
    seq(a(n), n=1..30); # Zerinvary Lajos, Mar 28 2007
  • Mathematica
    A064169[n_]:= (s = Sum[1/k, {k, n}]; Numerator[s] - Denominator[s]); Table[A064169[n], {n, 35}]
    Numerator[Table[Sum[1/k, {k, 2, n}], {n, 35}]] (* Alexander Adamchuk, Jun 09 2006 *)
    Numerator[#] - Denominator[#] &/@ HarmonicNumber[Range[35]] (* Harvey P. Dale, Apr 25 2016 *)
    Numerator[Accumulate[1/Range[2, 35]]] (* Alonso del Arte, Nov 21 2018 *)
    a[n_] := Numerator[PolyGamma[1 + n] + EulerGamma - 1];
    Table[a[n], {n, 1, 29}] (* Peter Luschny, Feb 19 2022 *)
  • PARI
    a(n) = my(h=sum(i=1, n, 1/i)); numerator(h)-denominator(h) \\ Felix Fröhlich, Jan 14 2019
    
  • Python
    from sympy import harmonic
    def A064169(n): return (lambda x: x.p - x.q)(harmonic(n)) # Chai Wah Wu, Sep 27 2021
  • Sage
    [numerator(harmonic_number(n)) - denominator(harmonic_number(n)) for n in (1..35)] # G. C. Greubel, Jul 27 2019
    

Formula

Numerator of (gamma + Psi(n+1) - 1). - Vladeta Jovovic, Aug 12 2002
From Alexander Adamchuk, Jun 09 2006: (Start)
a(n) = numerator of Sum_{k = 2..n} 1/k.
a(n) = A001008(n) - A002805(n).
a(n) = numerator of (the n-th harmonic number minus 1).
a(n) = numerator of A001008(n)/A002805(n) - 1. (End)
a(n) = numerator of A027612(n-1)/(A027611(n)*n^2*(n-1)!), n > 1. - Gary Detlefs, Aug 05 2011
a(n) = numerator(Sum_{k = 1..n-1} 1/(3*k + 3)). - Gary Detlefs, Sep 14 2011
a(n) = numerator(Sum_{k = 0..n-1} 2/(k+2)). - Gary Detlefs, Oct 06 2011
a(n) = numerator(Sum_{k = 1..n} frac(1/k)). - Michel Marcus, Sep 27 2021

Extensions

One more term from Robert G. Wilson v, Sep 28 2001
More terms from Vladeta Jovovic, Aug 12 2002

A124837 Numerators of third-order harmonic numbers (defined by Conway and Guy, 1996).

Original entry on oeis.org

1, 7, 47, 57, 459, 341, 3349, 3601, 42131, 44441, 605453, 631193, 655217, 1355479, 23763863, 24444543, 476698557, 162779395, 166474515, 34000335, 265842403, 812400067, 20666950267, 21010170067, 192066102203, 194934439103
Offset: 1

Views

Author

Jonathan Vos Post, Nov 10 2006

Keywords

Comments

Denominators are A124838. All fractions reduced. Thanks to Jonathan Sondow for verifying these calculations. He suggests that the equivalent definition in terms of first order harmonic numbers may be computationally simpler. We are happy with the description of A027612 Numerator of 1/n + 2/(n-1) + 3/(n-2) + ... + (n-1)/2 + n, but baffled by the description of A027611.
From Alexander Adamchuk, Nov 11 2006: (Start)
a(n) is the numerator of H(n, (3)) = Sum_{m=1..n} Sum_{k=1..m} HarmonicNumber(k).
Denominators are listed in A124838.
p divides a(p-5) for prime p > 5.
Primes are listed in A129880.
Numbers k such that a(k) is prime are listed in A129881. (End)

Examples

			a(1) = 1 = numerator of 1/1.
a(2) = 7 = numerator of 1/1 + 5/2 = 7/2.
a(3) = 47 = numerator of 7/2 + 13/3 = 47/6.
a(4) = 57 = numerator of 47/6 + 77/12 = 57/4.
a(5) = 549 = numerator of 57/4 + 87/10 = 549/20.
a(6) = 341 = numerator of 549/20 + 223/20 = 341/10
a(7) = 3349 = numerator of 341/10 + 481/35 = 3349/70.
a(8) = 88327 = numerator of 3349/70 + 4609/280 = 88327/1260.
a(9) = 3844 = numerator of 88327/1260 + 4861/252 = 3844/45.
a(10) = 54251 = numerator of 3844/45 + 55991/2520 = 54251/504, or, untelescoping:
a(10) = 54251 = numerator of 1/1 + 5/2 + 13/3 + 77/12 + 87/10 + 223/20 + 481/35 + 4609/252 + 4861/252 + 55991/2520 = 54251/504.
		

References

  • J. H. Conway and R. K. Guy, The Book of Numbers, New York: Springer-Verlag, pp. 143 and 258-259, 1996.

Crossrefs

Programs

  • Haskell
    a124837 n = a213998 (n + 2) (n - 1) -- Reinhard Zumkeller, Jul 03 2012
  • Mathematica
    Table[Numerator[(n+2)!/2!/n!*Sum[1/k,{k,3,n+2}]],{n,1,30}] (* Alexander Adamchuk, Nov 11 2006 *)

Formula

A124837(n)/A124838(n) = Sum{i=1..n} A027612(n)/A027611(n+1).
From Alexander Adamchuk, Nov 11 2006: (Start)
a(n) = numerator(Sum_{m=1..n} Sum_{l=1..m} Sum_{k=1..l} 1/k).
a(n) = numerator(((n+2)!/(2!*n!)) * Sum_{k=3..n+2} 1/k).
a(n) = numerator(((n+2)*(n+1)/2) * Sum_{k=3..n+2} 1/k). (End)
a(n) = numerator(Sum_{k=0..n-1} (-1)^k*binomial(-3,k)/(n-k)). - Gary Detlefs, Jul 18 2011
a(n) = A213998(n+2,n-1). - Reinhard Zumkeller, Jul 03 2012

Extensions

Corrected and extended by Alexander Adamchuk, Nov 11 2006

A074791 Numbers k such that k does not divide the denominator of the k-th harmonic number.

Original entry on oeis.org

6, 18, 20, 21, 33, 42, 54, 63, 66, 77, 100, 110, 120, 156, 162, 189, 198, 272, 294, 336, 342, 363, 377, 435, 486, 500, 506, 559, 567, 594, 600, 610, 629, 685, 703, 812, 847, 880, 924, 930, 957, 1067, 1166, 1210, 1243, 1247, 1287, 1320, 1332, 1458, 1590, 1640
Offset: 1

Views

Author

Benoit Cloitre, Sep 07 2002

Keywords

Comments

k such that A064169(k) is different from A027612(k).
Also k such that A096617(k) is different from A001008(k). - Alexander Adamchuk, Jun 26 2006
This sequence contains A036689(k) for all k > 1. - Wouter van Doorn, Nov 06 2024

Crossrefs

Programs

  • Mathematica
    Select[ Range[1700], Mod[ Denominator[ HarmonicNumber[ # ]], # ] != 0 &] (* Robert G. Wilson v, Sep 28 2005 *)
    seq = {}; s = 0; Do[s += 1/n; If[! Divisible[Denominator[s], n], AppendTo[seq, n]], {n, 1, 2000}]; seq (* Amiram Eldar, Dec 01 2020 *)

Formula

Is a(n) asymptotic to c*n^2 0.5
a(n) < 2*n^2*log(n)^2 for all n > 2. This follows from the fact that for all k > 1 there exists an n such that A036689(k) is equal to A074791(n). - Wouter van Doorn, Nov 06 2024

Extensions

Better description and more terms from Robert G. Wilson v, Sep 28 2005

A022819 a(n) = floor(1/(n-1) + 2/(n-2) + 3/(n-3) + ... + (n-1)/1).

Original entry on oeis.org

0, 0, 1, 2, 4, 6, 8, 11, 13, 16, 19, 22, 25, 28, 31, 34, 38, 41, 44, 48, 51, 55, 59, 62, 66, 70, 74, 78, 81, 85, 89, 93, 97, 101, 106, 110, 114, 118, 122, 126, 131, 135, 139, 144, 148, 152, 157, 161, 166, 170, 174, 179, 183, 188, 193, 197, 202, 206, 211, 216
Offset: 0

Keywords

Comments

a(n) = A214075(n,n-2) for n > 1. - Reinhard Zumkeller, Jul 03 2012

Examples

			a(2) = floor(1/1) = 1;
a(3) = floor(1/2 + 2/1) = floor(5/2) = 2;
a(4) = floor(1/3 + 2/2 + 3/1) = floor(26/6) = 4.
		

Crossrefs

Cf. A027612.

Programs

  • Haskell
    import Data.Ratio ((%))
    a022819 n = floor $ sum $ zipWith (%) [1 .. n-1] [n-1, n-2 .. 1]
    -- Reinhard Zumkeller, Jul 03 2012
  • Mathematica
    s=0; Table[s+=HarmonicNumber[j]//N; Floor[s],{j,0,5!}] (* Vladimir Joseph Stephan Orlovsky, Feb 11 2010 *)
    Join[{0},Floor[Accumulate[HarmonicNumber[Range[0,60]]]]] (* Harvey P. Dale, Sep 16 2019 *)

Formula

a(n) = floor(sum_{i=2..n} n/i) = floor(A000027(n)*(A001008(n)/A002805(n)-1)) = floor(A006675(n)/A000142(n)) = floor(A001705(n-1)/A000142(n-1)). - Henry Bottomley, May 05 2001

A330718 a(n) = numerator(Sum_{k=1..n} (2^k-2)/k).

Original entry on oeis.org

0, 1, 3, 13, 25, 137, 245, 871, 517, 4629, 8349, 45517, 83317, 1074679, 1992127, 7424789, 13901189, 78403447, 147940327, 280060651, 531718651, 11133725681, 21243819521, 40621501691, 15565330735, 388375065019, 248882304985, 479199924517, 923951191477, 2973006070891
Offset: 1

Author

Amiram Eldar and Thomas Ordowski, Dec 28 2019

Keywords

Comments

If p > 3 is prime, then p^2 | a(p).
Note the similarity to Wolstenholme's theorem.
Conjecture: for n > 3, if n^2 | a(n), then n is prime.
Are there the weak pseudoprimes m such that m | a(m)?
Primes p such that p^3 | a(p) are probably A088164.
If p is an odd prime, then a(p+1) == A330719(p+1) (mod p).
If p > 3 is a prime, then p^2 | numerator(Sum_{k=1..p+1} F(k)), where F(n) = Sum_{k=1..n} (2^(k-1)-1)/k. Cf. A027612 (a weaker divisibility).

Examples

			Numerators of 0, 1, 3, 13/2, 25/2, 137/6, 245/6, ...
		

Programs

  • Magma
    [Numerator( &+[(2^k -2)/k: k in [1..n]] ): n in [1..30]]; // G. C. Greubel, Dec 28 2019
    
  • Maple
    seq(numer(add((2^k -2)/k, k = 1..n)), n = 1..30); # G. C. Greubel, Dec 28 2019
  • Mathematica
    Numerator @ Accumulate @ Array[(2^# - 2)/# &, 30]
    Table[Numerator[Simplify[-(2^(n+1)*LerchPhi[2,1,n+1] +Pi*I +2*HarmonicNumber[n])]], {n,30}] (* G. C. Greubel, Dec 28 2019 *)
  • PARI
    a(n) = numerator(sum(k=1, n, (2^k-2)/k)); \\ Michel Marcus, Dec 28 2019
    
  • Sage
    [numerator( sum((2^k -2)/k for k in (1..n)) ) for n in (1..30)] # G. C. Greubel, Dec 28 2019

Formula

a(n) = numerator(Sum_{k=1..n} (2^(k-1)-1)/k).
a(n+1) = numerator(a(n)/A330719(n) + A225101(n+1)/(2*A159353(n+1))).
a(p) = a(p-1) + A007663(n)*A330719(p-1) for p = prime(n) > 2.
a(n) = numerator(-(2^(n+1)*LerchPhi(2,1,n+1) + Pi*i + 2*HarmonicNumber(n))). - G. C. Greubel, Dec 28 2019
a(n) = numerator(A279683(n)/n!) for n > 0. - Amiram Eldar and Thomas Ordowski, Jan 15 2020
For n > 1, a(n) = A000265(A290347(n)). - Thomas Ordowski, Mar 29 2025
Showing 1-10 of 30 results. Next