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

A238166 Decimal expansion of sum_(n>=1) H(n,2)/n^4 where H(n,2) = A007406(n)/A007407(n) is the n-th harmonic number of order 2.

Original entry on oeis.org

1, 1, 0, 5, 8, 2, 6, 4, 4, 4, 4, 3, 8, 8, 1, 7, 8, 5, 4, 0, 0, 8, 8, 4, 5, 7, 6, 8, 8, 7, 6, 6, 8, 0, 9, 8, 4, 5, 4, 9, 7, 9, 6, 2, 4, 2, 4, 1, 9, 6, 0, 4, 1, 5, 3, 5, 1, 7, 2, 9, 7, 9, 4, 0, 5, 6, 3, 8, 0, 6, 4, 6, 1, 8, 3, 0, 7, 0, 1, 4, 6, 9, 3, 3, 8, 6, 0, 1, 7, 7, 2, 5, 3, 9, 0, 0, 5, 7, 5, 7
Offset: 1

Views

Author

Jean-François Alcover, Feb 19 2014

Keywords

Examples

			1.1058264444388178540088457688766809845497962424196...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[Zeta[3]^2 - 1/3*Zeta[6], 10, 100][[1]]
  • PARI
    zeta(3)^2-Pi^6/2835 /* Michel Marcus, Jul 04 2014 */

Formula

Equals zeta(3)^2 - zeta(6)/3.

A244664 Decimal expansion of Sum_{n >= 1} H(n,2)/n^2 where H(n,2) = A007406(n)/A007407(n) is the n-th harmonic number of order 2.

Original entry on oeis.org

1, 8, 9, 4, 0, 6, 5, 6, 5, 8, 9, 9, 4, 4, 9, 1, 8, 3, 5, 1, 5, 3, 0, 0, 6, 4, 6, 8, 9, 4, 7, 0, 4, 3, 8, 2, 9, 8, 5, 5, 8, 1, 4, 1, 6, 5, 8, 5, 7, 7, 7, 2, 0, 8, 8, 4, 4, 5, 2, 0, 8, 3, 7, 7, 0, 2, 7, 2, 1, 1, 0, 7, 8, 3, 2, 7, 1, 9, 5, 4, 8, 1, 4, 7, 4, 5, 9, 1, 8, 6, 2, 8, 9, 7, 9, 7, 4, 8, 5, 5
Offset: 1

Views

Author

Jean-François Alcover, Jul 04 2014

Keywords

Examples

			1.894065658994491835153006468947043829855814165857772088445208377027211...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[7/4*Zeta[4], 10, 100] // First
  • PARI
    7*zeta(4)/4 \\ Michel Marcus, Jul 04 2014

Formula

Equals 7*Pi^4/360 = (7/4)*A013662.
From Peter Bala, Jul 27 2025: (Start)
Series acceleration formula:
Let s(n) = Sum_{k = 1..n} H(k,2)/k^2 and S(n) = Sum_{k = 1..n} (-1)^(n+k)*binomial(n, k)*binomial(n+k, k)*s(n+k). It appears that S(n) converges much more rapidly to 7*Pi^4/360 than s(n).
For example, s(50) = 1.8(61...) is only correct to 2 decimal digits, while S(50) = 1.89406565899449183515 30064689470(06...) is correct to 32 decimal digits. (End)

A370774 Denominator of the n-th partial sum of the generalized harmonic numbers A007406/A007407.

Original entry on oeis.org

1, 4, 18, 144, 600, 3600, 44100, 78400, 635040, 254016, 12806640, 153679680, 1855133280, 8657288640, 16232416200, 519437318400, 8339854723200, 150117385017600, 541923759913536, 516117866584320
Offset: 1

Views

Author

R. J. Mathar, May 01 2024

Keywords

Comments

Partial sums of A007406/A007407 are 1, 9/4, 65/18, 725/144, 3899/600, 28763/3600, ...

Crossrefs

Cf. A120286 (numerators).

Programs

  • Maple
    A007406_7 := proc(n)
        local i;
        add(1/i^2,i=1..n) ;
    end proc:
    A370774 := proc(n)
        add( A007406_7(i),i=1..n) ;
        denom(%) ;
    end proc:
    seq(A370774(n),n=1..20) ;
  • Mathematica
    Table[-EulerGamma + HarmonicNumber[1 + n, 2] + n*HarmonicNumber[1 + n, 2] - PolyGamma[0, 2 + n], {n, 1, 20}] // Denominator (* Vaclav Kotesovec, May 02 2024 *)
  • PARI
    a(n) = denominator(sum(k=1, n, sum(i=1, k, 1/i^2))); \\ Michel Marcus, May 01 2024
    
  • Python
    from fractions import Fraction
    def A370774(n): return sum(Fraction(n-i+1,i**2) for i in range(1,n+1)).denominator # Chai Wah Wu, May 01 2024

A309829 Numbers k for which A120077(k) != A007407(k).

Original entry on oeis.org

20, 21, 110, 136, 156, 930, 44310
Offset: 1

Views

Author

Jeppe Stig Nielsen, Aug 18 2019

Keywords

Comments

The sequence of rationals related to A120077 is f(k) = Sum_{j=1..k-1} (1/j^2 - 1/k^2), motivated by each term's interpretation as the energy difference between shells k and j in a hydrogen atom model. This can easily be seen to be equal to f(k) = (Sum_{j=1..k} 1/j^2) - 1/k. Compare this with g(k) = Sum_{j=1..k} 1/j^2 which is the starting point for A007407. The question is, when does the final subtraction of 1/k change the denominator (in lowest term)? In one case (k=21), the denominator belonging to f(k) is greater than that belonging to g(k). In cases k=20, 110, 136, 156, 930, 44310, the opposite is true.
Will gcd(A120077(k), A007407(k)) always be one of the numbers A120077(k) and A007407(k)?
Should this sequence be infinite?

Crossrefs

Programs

  • PARI
    s=1; for(n=2, +oo, s += 1/n^2; denominator(s)!=denominator(s-1/n) && print1(n, ", "))

A013661 Decimal expansion of Pi^2/6 = zeta(2) = Sum_{m>=1} 1/m^2.

Original entry on oeis.org

1, 6, 4, 4, 9, 3, 4, 0, 6, 6, 8, 4, 8, 2, 2, 6, 4, 3, 6, 4, 7, 2, 4, 1, 5, 1, 6, 6, 6, 4, 6, 0, 2, 5, 1, 8, 9, 2, 1, 8, 9, 4, 9, 9, 0, 1, 2, 0, 6, 7, 9, 8, 4, 3, 7, 7, 3, 5, 5, 5, 8, 2, 2, 9, 3, 7, 0, 0, 0, 7, 4, 7, 0, 4, 0, 3, 2, 0, 0, 8, 7, 3, 8, 3, 3, 6, 2, 8, 9, 0, 0, 6, 1, 9, 7, 5, 8, 7, 0
Offset: 1

Views

Author

Keywords

Comments

"In 1736 he [Leonard Euler, 1707-1783] discovered the limit to the infinite series, Sum 1/n^2. He did it by doing some rather ingenious mathematics using trigonometric functions that proved the series summed to exactly Pi^2/6. How can this be? ... This demonstrates one of the most startling characteristics of mathematics - the interconnectedness of, seemingly, unrelated ideas." - Clawson [See Hardy and Wright, Theorems 332 and 333. - N. J. A. Sloane, Jan 20 2017]
Also dilogarithm(1). - Rick L. Shepherd, Jul 21 2004
Also Integral_{x>=0} x/(exp(x)-1) dx. [Abramowitz-Stegun, 23.2.7., for s=2, p. 807]
For the partial sums see the fractional sequence A007406/A007407.
Pi^2/6 is also the length of the circumference of a circle whose diameter equals the ratio of volume of an ellipsoid to the circumscribed cuboid. Pi^2/6 is also the length of the circumference of a circle whose diameter equals the ratio of surface area of a sphere to the circumscribed cube. - Omar E. Pol, Oct 07 2011
1 < n^2/(eulerphi(n)*sigma(n)) < zeta(2) for n > 1. - Arkadiusz Wesolowski, Sep 04 2012
Volume of a sphere inscribed in a cube of volume Pi. More generally, Pi^x/6 is the volume of an ellipsoid inscribed in a cuboid of volume Pi^(x-1). - Omar E. Pol, Feb 17 2016
Surface area of a sphere inscribed in a cube of surface area Pi. More generally, Pi^x/6 is the surface area of a sphere inscribed in a cube of surface area Pi^(x-1). - Omar E. Pol, Feb 19 2016
zeta(2)+1 is a weighted average of the integers, n > 2, using zeta(n)-1 as the weights for each n. We have: Sum_{n >= 2} (zeta(n)-1) = 1 and Sum_{n >= 2} n*(zeta(n)-1) = zeta(2)+1. - Richard R. Forberg, Jul 14 2016
zeta(2) is the expected value of sigma(n)/n. - Charlie Neder, Oct 22 2018
Graham shows that a rational number x can be expressed as a finite sum of reciprocals of distinct squares if and only if x is in [0, Pi^2/6-1) U [1, Pi^2/6). See section 4 for other results and Theorem 5 for the underlying principle. - Charles R Greathouse IV, Aug 04 2020
From Peter Bala, Aug 24 2025: (Start)
By definition, zeta(2) = lim_{n -> oo} s(n), where s(n) = Sum_{k = 1..n} 1/k^2. The convergence is slow. For example, s(50) = 1.6(25...) is only correct to 1 decimal digit.
Let S(n) = Sum_{k = 0..n} (-1)^(n+k)*binomial(n, k)*binomial(n+k, k)*s(n+k). It appears that S(n) converges to zeta(2) much more rapidly. For example, S(50) = 1.64493406684822643647241516664602(137...) gives zeta(2) correct to 32 decimal digits. Cf. A073004. (End)

Examples

			1.6449340668482264364724151666460251892189499012067984377355582293700074704032...
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 811.
  • F. Aubonnet, D. Guinin and B. Joppin, Précis de Mathématiques, Analyse 2, Classes Préparatoires, Premier Cycle Universitaire, Bréal, 1990, Exercice 908, pages 82 and 91-92.
  • Calvin C. Clawson, Mathematical Mysteries, The Beauty and Magic of Numbers, Perseus Books, 1996, p. 97.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 262.
  • W. Dunham, Euler: The Master of Us All, The Mathematical Association of America, Washington, D.C., 1999, p. xxii.
  • Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, 2003, Sections 1.4.1 and 5.16, pp. 20, 365.
  • Hardy and Wright, 'An Introduction to the Theory of Numbers'. See Theorems 332 and 333.
  • A. A. Markoff, Mémoire sur la transformation de séries peu convergentes en séries très convergentes, Mém. de l'Acad. Imp. Sci. de St. Pétersbourg, XXXVII, 1890.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 10, 161-162.
  • G. F. Simmons, Calculus Gems, Section B.15, B.24, pp. 270-271, 323-325, McGraw Hill, 1992.
  • Arnold Walfisz, Weylsche Exponentialsummen in der neueren Zahlentheorie, Deutscher Verlag der Wissenschaften, Berlin, 1963, p. 99, Satz 1.
  • A. Weil, Number theory: an approach through history; from Hammurapi to Legendre, Birkhäuser, Boston, 1984; see p. 261.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Revised Edition, Penguin Books, London, England, 1997, page 23.

Crossrefs

Cf. A001008 (H(n): numerators), A002805 (denominators), A013679 (continued fraction), A002117 (zeta(3)), A013631 (cont.frac. for zeta(3)), A013680 (cont.frac. for zeta(4)), 1/A059956, A108625, A142995, A142999.
Cf. A000290.

Programs

  • Magma
    pi:=Pi(RealField(110)); Reverse(Intseq(Floor(10^105*pi^2/6))); // Vincenzo Librandi, Oct 13 2015
    
  • Maple
    evalf(Pi^2/6,120); # Muniru A Asiru, Oct 25 2018
    # Calculates an approximation with n exact decimal places (small deviation
    # in the last digits are possible). Goes back to ideas of A. A. Markoff 1890.
    zeta2 := proc(n) local q, s, w, v, k; q := 0; s := 0; w := 1; v := 4;
    for k from 2 by 2 to 7*n/2 do
        w := w*v/k;
        q := q + v;
        v := v + 8;
        s := s + 1/(w*q);
    od; 12*s; evalf[n](%) end:
    zeta2(1000); # Peter Luschny, Jun 10 2020
  • Mathematica
    RealDigits[N[Pi^2/6, 100]][[1]]
    RealDigits[Zeta[2],10,120][[1]] (* Harvey P. Dale, Jan 08 2021 *)
  • Maxima
    fpprec : 100$ ev(bfloat(zeta(2)))$ bfloat(%); /* Martin Ettl, Oct 21 2012 */
    
  • PARI
    default(realprecision, 200); Pi^2/6
    
  • PARI
    default(realprecision, 200); dilog(1)
    
  • PARI
    default(realprecision, 200); zeta(2)
    
  • PARI
    A013661(n)={localprec(n+2); Pi^2/.6\10^n%10} \\ Corrected and improved by M. F. Hasler, Apr 20 2021
    
  • PARI
    default(realprecision, 20080); x=Pi^2/6; for (n=1, 20000, d=floor(x); x=(x-d)*10; write("b013661.txt", n, " ", d)); \\ Harry J. Smith, Apr 29 2009
    
  • PARI
    sumnumrat(1/x^2, 1) \\ Charles R Greathouse IV, Jan 20 2022
    
  • Python
    # Use some guard digits when computing.
    # BBP formula (3 / 16) P(2, 64, 6, (16, -24, -8, -6,  1, 0)).
    from decimal import Decimal as dec, getcontext
    def BBPzeta2(n: int) -> dec:
        getcontext().prec = n
        s = dec(0); f = dec(1); g = dec(64)
        for k in range(int(n * 0.5536546824812272) + 1):
            sixk = dec(6 * k)
            s += f * ( dec(16) / (sixk + 1) ** 2 - dec(24) / (sixk + 2) ** 2
                     - dec(8)  / (sixk + 3) ** 2 - dec(6)  / (sixk + 4) ** 2
                     + dec(1)  / (sixk + 5) ** 2 )
            f /= g
        return (s * dec(3)) / dec(16)
    print(BBPzeta2(2000))  # Peter Luschny, Nov 01 2023

Formula

Limit_{n->oo} (1/n)*(Sum_{k=1..n} frac((n/k)^(1/2))) = zeta(2) and in general we have lim_{n->oo} (1/n)*(Sum_{k=1..n} frac((n/k)^(1/m))) = zeta(m), m >= 2. - Yalcin Aktar, Jul 14 2005
Equals Integral_{x=0..1} (log(x)/(x-1)) dx or Integral_{x>=1} (log(x/(x-1))/x) dx. - Jean-François Alcover, May 30 2013
For s >= 2 (including Complex), zeta(s) = Product_{n >= 1} prime(n)^s/(prime(n)^s - 1). - Fred Daniel Kline, Apr 10 2014
Also equals 1 + Sum_{n>=0} (-1)^n*StieltjesGamma(n)/n!. - Jean-François Alcover, May 07 2014
zeta(2) = Sum_{n>=1} ((floor(sqrt(n)) - floor(sqrt(n-1)))/n). - Mikael Aaltonen, Jan 10 2015
zeta(2) = Sum_{n>=1} (((sqrt(5)-1)/2/sqrt(5))^n/n^2) + Sum_{n>=1} (((sqrt(5)+1)/2/sqrt(5))^n/ n^2) + log((sqrt(5)-1)/2/sqrt(5))log((sqrt(5)+1)/2/sqrt(5)). - Seiichi Kirikami, Oct 14 2015
The above formula can also be written zeta(2) = dilog(x) + dilog(y) + log(x)*log(y) where x = (1-1/sqrt(5))/2 and y=(1+1/sqrt(5))/2. - Peter Luschny, Oct 16 2015
zeta(2) = Integral_{x>=0} 1/(1 + e^x^(1/2)) dx, because (1 - 1/2^(s-1))*Gamma[1 + s]*Zeta[s] = Integral_{x>=0} 1/(1 + e^x^(1/s)) dx. After Jean-François Alcover in A002162. - Mats Granvik, Sep 12 2016
zeta(2) = Product_{n >= 1} (144*n^4)/(144*n^4 - 40*n^2 + 1). - Fred Daniel Kline, Oct 29 2016
zeta(2) = lim_{n->oo} (1/n) * Sum_{k=1..n} A017665(k)/A017666(k). - Dimitri Papadopoulos, May 10 2019 [See the Walfisz reference, and a comment in A284648, citing also the Sándor et al. Handbook. - Wolfdieter Lang, Aug 22 2019]
Equals Sum_{k>=1} H(k)/(k*(k+1)), where H(k) = A001008(k)/A002805(k) is the k-th harmonic number. - Amiram Eldar, Aug 16 2020
Equals (8/3)*(1/2)!^4 = (8/3)*Gamma(3/2)^4. - Gary W. Adamson, Aug 17 2021
Equals ((m+1)/m) * Integral_{x=0..1} log(Sum {k=0..m} x^k )/x dx, m > 0 (Aubonnet reference). - _Bernard Schott, Feb 11 2022
Equals 1 + Sum_{n>=1} n*(zeta(n+2)-1). - Richard R. Forberg, Jun 04 2023; improved by Natalia L. Skirrow, Jul 25 2025
Equals Psi'(1) where Psi'(x) is the trigamma function (by Abramowitz Stegun 6.4.2). - Andrea Pinos, Oct 22 2024
Equals Integral_{x=0..1} Integral_{y=0..1} 1/(1 - x*y) dy dx. - Kritsada Moomuang, May 22 2025
Equals 1 + Sum_{n>=1} 1/(n^2*(n+1)). - Natalia L. Skirrow, Jul 25 2025

Extensions

Edited by N. J. A. Sloane, Nov 22 2023

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

A007406 Wolstenholme numbers: numerator of Sum_{k=1..n} 1/k^2.

Original entry on oeis.org

1, 5, 49, 205, 5269, 5369, 266681, 1077749, 9778141, 1968329, 239437889, 240505109, 40799043101, 40931552621, 205234915681, 822968714749, 238357395880861, 238820721143261, 86364397717734821, 17299975731542641, 353562301485889, 354019312583809, 187497409728228241
Offset: 1

Views

Author

Keywords

Comments

By Wolstenholme's theorem, p divides a(p-1) for prime p > 3. - T. D. Noe, Sep 05 2002
Also p divides a( (p-1)/2 ) for prime p > 3. - Alexander Adamchuk, Jun 07 2006
The rationals a(n)/A007407(n) converge to Zeta(2) = (Pi^2)/6 = 1.6449340668... (see the decimal expansion A013661).
For the rationals a(n)/A007407(n), n >= 1, see the W. Lang link under A103345 (case k=2).
See the Wolfdieter Lang link under A103345 on Zeta(k, n) with the rationals for k=1..10, g.f.s and polygamma formulas. - Wolfdieter Lang, Dec 03 2013
Denominator of the harmonic mean of the first n squares. - Colin Barker, Nov 13 2014
Conjecture: for n > 3, gcd(n, a(n-1)) = A089026(n). Checked up to n = 10^5. - Amiram Eldar and Thomas Ordowski, Jul 28 2019
True if n is prime, by Wolstenholme's theorem. It remains to show that gcd(n, a(n-1)) = 1 if n > 3 is composite. - Jonathan Sondow, Jul 29 2019
From Peter Bala, Feb 16 2022: (Start)
Sum_{k = 1..n} 1/k^2 = 1 + (1 - 1/2^2)*(n-1)/(n+1) - (1/2^2 - 1/3^2)*(n-1)*(n-2)/((n+1)*(n+2)) + (1/3^2 - 1/4^2)*(n-1)*(n-2)*(n-3)/((n+1)*(n+2)*(n+3)) - (1/4^2 - 1/5^2)*(n-1)*(n-2)*(n-3)*(n-4)/((n+1)*(n+2)*(n+3)*(n+4)) + .... Cf. A082687 and A120778.
This identity allows us to extend the definition of Sum_{k = 1..n} 1/k^2 to non-integral values of n. (End)
Numerators of the Eulerian numbers T(-2,k) for k = 0,1..., if T(n,k) is extended to negative n by the recurrence T(n,k) = (k+1)*T(n-1,k) + (n-k)*T(n-1,k-1) (indexed as in A173018). - Michael J. Collins, Oct 10 2024

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A001008, A007407 (denominators), A000290, A082687, A120778.
Numbers n such that a(n) is prime are listed in A111354. Primes in {a(n)} are listed in A123751. - Alexander Adamchuk, Oct 11 2006

Programs

  • Haskell
    import Data.Ratio ((%), numerator)
    a007406 n = a007406_list !! (n-1)
    a007406_list = map numerator $ scanl1 (+) $ map (1 %) $ tail a000290_list
    -- Reinhard Zumkeller, Jul 06 2012
    
  • Magma
    [Numerator(&+[1/k^2:k in [1..n]]):n in [1..23]]; // Marius A. Burtea, Aug 02 2019
  • Maple
    a:= n-> numer(add(1/i^2, i=1..n)): seq(a(n), n=1..24);  # Zerinvary Lajos, Mar 28 2007
  • Mathematica
    a[n_] := If[ n<1, 0, Numerator[HarmonicNumber[n, 2]]]; Table[a[n], {n, 100}]
    Numerator[HarmonicNumber[Range[20],2]] (* Harvey P. Dale, Jul 06 2014 *)
  • PARI
    {a(n) = if( n<1, 0, numerator( sum( k=1, n, 1 / k^2 ) ) )} /* Michael Somos, Jan 16 2011 */
    

Formula

Sum_{k=1..n} 1/k^2 = sqrt(Sum_{j=1..n} Sum_{i=1..n} 1/(i*j)^2). - Alexander Adamchuk, Oct 26 2004
G.f. for rationals a(n)/A007407(n), n >= 1: polylog(2,x)/(1-x).
a(n) = Numerator of (Pi^2)/6 - Zeta(2,n). - Artur Jasinski, Mar 03 2010

A103345 Numerator of Sum_{k=1..n} 1/k^6 = Zeta(6,n).

Original entry on oeis.org

1, 65, 47449, 3037465, 47463376609, 47464376609, 5584183099672241, 357389058474664049, 260537105518334091721, 52107472322919827957, 92311616995117182948130877, 92311647383100199924330877, 445570781131605573859221176881493, 445570839299219762020391212081493
Offset: 1

Views

Author

Wolfdieter Lang, Feb 15 2005

Keywords

Comments

For the rationals Zeta(k,n) for k = 1..10 and n = 1..20, see the W. Lang link.
a(n) gives the partial sum, Zeta(6,n), of Euler's (later Riemann's) Zeta(6). Zeta(k,n), k >= 2, is sometimes also called H(k,n) because for k = 1 these would be the harmonic numbers A001008/A002805. However, H(1,n) does not give partial sums of a convergent series.

Examples

			The first few fractions are 1, 65/64, 47449/46656, 3037465/2985984, 47463376609/46656000000, ... = A103345/A103346. - _Petros Hadjicostas_, May 10 2020
		

Crossrefs

Cf. A013664, A291456. For the denominators, see A103346.

Programs

Formula

a(n) = numerator(Sum_{k=1..n} 1/k^6) = numerator(A291456(n)/(n!)^6).
G.f. for rationals Zeta(6, n): polylogarithm(6, x)/(1-x).
Zeta(6, n) = (1/945)*Pi^6 - psi(5, n+1)/5!, see eq. 6.4.3 with m = 5, p. 260, of the Abramowitz-Stegun reference. - Wolfdieter Lang, Dec 03 2013

A075135 Numerator of the generalized harmonic number H(n,3,1) described below.

Original entry on oeis.org

1, 5, 39, 209, 2857, 11883, 233057, 2632787, 13468239, 13739939, 433545709, 7488194853, 281072414761, 284780929571, 12393920563953, 288249495707519, 2038704876507433, 2058454144222533, 2077126179153173, 60750140156034617
Offset: 1

Views

Author

T. D. Noe, Sep 04 2002

Keywords

Comments

For integers a and b, H(n,a,b) is the sum of the fractions 1/(a i + b), i = 0,1,..,n-1. This database already contains six instances of generalized harmonic numbers. Partial sums of the harmonic series 1+1/2+1/3+1/4+... are given by the sequence of harmonic numbers H(n,1,1) = A001008(n) / A002805(n).
The Jeep problem gives rise to the series H(n,2,1) = A025550(n) / A025547(n). Recent additions to the database are 3 * H(n,3,1) = A074596(n) / A051536(n), 3 * H(n,3,2) = A074597(n) / A051540(n), 4 * H(n,4,1) = A074598(n) / A051539(n) and 4 * H(n,4,3) = A074637(n) / A074638(n) . The numerator of H(n,4,1) is A075136. The fractions H(n,5,1), H(n,5,2), H(n,5,3) and H(n,5,4) are in A075137-A075144.
The sequence H(n,a,b) is of interest only when a and b are relatively prime. The sequence can also be computed as H(n,a,b) = (PolyGamma[n+1+b/a] - PolyGamma[1+b/a])/a. The sequence H(n,a,b) diverges for all a and b.
According to Hardy and Wright, if p is an odd prime, then p divides the numerator of the harmonic number H(p-1,1,1). This result can be extended to generalized harmonic numbers: for odd integer n, let q = (n-2)a + 2b. If q is prime, then q divides the numerator of H(n-1,a,b). For this sequence (a=3, b=1) we conclude that 11 divides a(4), 17 divides a(6), 29 divides a(10) and 47 divides a(16).
Graham, Knuth and Patashnik define another type of generalized harmonic number as the sum of fractions 1/i^k, i=1,...,n. For k=2, the sequence of fractions is A007406(n) / A007407(n).

Examples

			a(3)=39 because 1 + 1/4 + 1/7 = 39/28.
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 263, 269, 272, 297, 302, 356.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 4th ed., Oxford Univ. Press, 1971, page 88.

Crossrefs

Programs

  • Mathematica
    a=3; b=1; maxN=20; s=0; Numerator[Table[s+=1/(a n + b), {n, 0, maxN-1}]]
    Accumulate[1/Range[1,60,3]]//Numerator (* Harvey P. Dale, Dec 30 2019 *)

A001819 Central factorial numbers: second right-hand column of triangle A008955.

Original entry on oeis.org

0, 1, 5, 49, 820, 21076, 773136, 38402064, 2483133696, 202759531776, 20407635072000, 2482492033152000, 359072203696128000, 60912644957448192000, 11977654199703478272000, 2702572249389834608640000
Offset: 0

Views

Author

Keywords

Comments

Coefficient of x^2 in Product_{k=0..n}(x + k^2). - Ralf Stephan, Aug 22 2004
p divides a(p-1) for prime p > 3. p divides a((p-1)/2) for prime p > 3. For prime p, p^2 divides a(n) for n > 2*p+1. - Alexander Adamchuk, Jul 11 2006; last comment corrected by Michel Marcus, May 20 2020
The ratio a(n)/A001044(n) is the partial sum of the reciprocals of squares. E.g., a(4)/A001044(4) = 820/576 = 1/1 + 1/4 + 1/9 + 1/16. - Pierre CAMI, Oct 30 2006
a(n) is the (n-1)-st elementary symmetric function of the squares of the first n numbers. - Anton Zakharov, Nov 06 2016
Primes p such that p^2 | a(p-1) are the Wolstenholme primes A088164. - Amiram Eldar and Thomas Ordowski, Aug 08 2019

References

  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 217.
  • 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

Second right-hand column of triangle A008955.
Equals row sums of A162990(n)/(n+1)^2 for n >= 1.

Programs

Formula

a_n = (n!)^2 * Sum_{k=1..n} 1/k^2. - Joe Keane (jgk(AT)jgk.org)
a(n) ~ (1/3)*Pi^3*n*e^(-2*n)*n^(2*n). - Joe Keane (jgk(AT)jgk.org), Jun 06 2002
Sum_{n>=0} a(n)*x^n/n!^2 = polylog(2, x)/(1-x). - Vladeta Jovovic, Jan 23 2003
a(n) = Sum_{i=1..n} 1/i^2 / Product_{i=1..n} 1/i^2. - Alexander Adamchuk, Jul 11 2006
a(0) = 0, a(n) = a(n-1)*n^2 + A001044(n-1). E.g., a(1) = 0*1 + 1 = 1 since A001044(0) = 1; a(2) = 1*2^2 + 1 = 5 since A001044(1) = 1; a(3) = 5*3^2 + 4 = 49 since A001044(2) = 4; and so on. - Pierre CAMI, Oct 30 2006
Recurrence: a(0) = 0, a(1) = 1, a(n+1) = (2*n^2 + 2*n + 1)*a(n) - n^4*a(n-1). The sequence b(n) = n!^2 satisfies the same recurrence with the initial conditions b(0) = 1, b(1) = 1. Hence we obtain the finite continued fraction expansion a(n)/b(n) = 1/(1 - 1^4/(5 - 2^4/(13 - 3^4/(25 - ... -(n-1)^4/((2*n^2 - 2*n + 1)))))), leading to the infinite continued fraction expansion zeta(2) = 1/(1-1^4/(5 - 2^4/(13 - 3^4/(25 - ... - n^4/((2*n^2 + 2*n + 1) - ...))))). Compare with A142995. Compare also with A024167 and A066989. - Peter Bala, Jul 18 2008
a(n)/(n!)^2 -> zeta(2) = A013661 as n -> infinity, rewriting the Keane formula. - Najam Haq (njmalhq(AT)yahoo.com), Jan 13 2010
a(n) = s(n+1,2)^2 - 2*s(n+1,1)*s(n+1,3), where s(n,k) are Stirling numbers of the first kind, A048994. - Mircea Merca, Apr 03 2012

Extensions

Minor edits by Vaclav Kotesovec, Jan 28 2015
Showing 1-10 of 52 results. Next