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

A074599 Numerator of 2 * H(n,2,1), a generalized harmonic number. See A075135. Also 2 * A350669.

Original entry on oeis.org

2, 8, 46, 352, 1126, 13016, 176138, 182144, 3186538, 62075752, 63461422, 1488711776, 7577414602, 23104065256, 680057071574, 21372905414144, 21646396991594, 21904260478904, 819482859775298, 828045249930848
Offset: 1

Views

Author

Robert G. Wilson v, Aug 27 2002

Keywords

Comments

2*(1 + 1/3 + ... + 1/(2*n-1))/Pi = a(n)/(A350670(n)*Pi) is the equivalent resistance between the points (0,0) and (n,n) on a 2-dimension infinite square grid of unit resistors. - Jianing Song, Apr 28 2025

Crossrefs

Cf. A350669. The denominators are in A350670.
Not always equal to the second left hand column of A161198 triangle divided by A025549. - Johannes W. Meijer, Jun 08 2009

Programs

  • Mathematica
    Table[ Numerator[ Sum[1/i, {i, 1/2, n}]], {n, 1, 20}]

A074596 Numerator of 3 * H(n,3,1), a generalized harmonic number. See A075135.

Original entry on oeis.org

3, 15, 117, 627, 8571, 35649, 699171, 7898361, 40404717, 41219817, 1300637127, 22464584559, 843217244283, 854342788713, 37181761691859, 864748487122557, 6116114629522299, 6175362432667599, 6231378537459519, 182250420468103851
Offset: 1

Views

Author

Robert G. Wilson v, Aug 27 2002

Keywords

Crossrefs

The denominators are in A051536.
Cf. A075135.

Programs

  • Mathematica
    Table[ Numerator[ Sum[1/i, {i, 1/3, n}]], {n, 1, 20}]

Extensions

a(15) corrected by Sean A. Irvine, Jan 22 2025

A074597 Numerator of 3 * H(n,3,2), a generalized harmonic number. See A075135.

Original entry on oeis.org

3, 21, 99, 1209, 9123, 164331, 34437, 823467, 11066355, 330317679, 1355321733, 990324351, 19205317149, 802205873349, 815985479709, 38957620226163, 197637723726063, 10617280487243739, 75264900895382073
Offset: 1

Views

Author

Robert G. Wilson v, Aug 27 2002

Keywords

Crossrefs

The denominators are in A051540.
Cf. A075135.

Programs

  • Mathematica
    Table[ Numerator[ Sum[1/i, {i, 2/3, n}]], {n, 1, 20}]

A001008 a(n) = numerator of harmonic number H(n) = Sum_{i=1..n} 1/i.

Original entry on oeis.org

1, 3, 11, 25, 137, 49, 363, 761, 7129, 7381, 83711, 86021, 1145993, 1171733, 1195757, 2436559, 42142223, 14274301, 275295799, 55835135, 18858053, 19093197, 444316699, 1347822955, 34052522467, 34395742267, 312536252003, 315404588903, 9227046511387
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.
By Wolstenholme's theorem, p^2 divides a(p-1) for all primes p > 3.
From Alexander Adamchuk, Dec 11 2006: (Start)
p divides a(p^2-1) for all primes p > 3.
p divides a((p-1)/2) for primes p in A001220.
p divides a((p+1)/2) or a((p-3)/2) for primes p in A125854.
a(n) is prime for n in A056903. Corresponding primes are given by A067657. (End)
a(n+1) is the numerator of the polynomial A[1, n](1) where the polynomial A[genus 1, level n](m) is defined to be Sum_{d = 1..n - 1} m^(n - d)/d. (See the Mathematica procedure generating A[1, n](m) below.) - Artur Jasinski, Oct 16 2008
Better solutions to the card stacking problem have been found by M. Paterson and U. Zwick (see link). - Hugo Pfoertner, Jan 01 2012
a(n) = A213999(n, n-1). - Reinhard Zumkeller, Jul 03 2012
a(n) coincides with A175441(n) if and only if n is not from the sequence A256102. The quotient a(n) / A175441(n) for n in A256102 is given as corresponding entry of A256103. - Wolfdieter Lang, Apr 23 2015
For a very short proof that the Harmonic series diverges, see the Goldmakher link. - N. J. A. Sloane, Nov 09 2015
All terms are odd while corresponding denominators (A002805) are all even for n > 1 (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, ... ].
Coincidences with A175441: the first 19 entries coincide because 20 is the first entry of A256102. Indeed, a(20)/A175441(20) = 55835135 / 11167027 = 5 = A256103(1). - _Wolfdieter Lang_, Apr 23 2015
		

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 258-261.
  • H. W. Gould, Combinatorial Identities, Morgantown Printing and Binding Co., 1972, # 1.45, page 6, #3.122, page 36.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 259.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, page 347.
  • 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.
  • 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. A145609-A145640. - Artur Jasinski, Oct 16 2008
Cf. A003506. - Paul Curtz, Nov 30 2013
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.
Cf. A195505.

Programs

  • GAP
    List([1..30],n->NumeratorRat(Sum([1..n],i->1/i))); # Muniru A Asiru, Dec 20 2018
  • Haskell
    import Data.Ratio ((%), numerator)
    a001008 = numerator . sum . map (1 %) . enumFromTo 1
    a001008_list = map numerator $ scanl1 (+) $ map (1 %) [1..]
    -- Reinhard Zumkeller, Jul 03 2012
    
  • Magma
    [Numerator(HarmonicNumber(n)): n in [1..30]]; // Bruno Berselli, Feb 17 2016
    
  • Maple
    A001008 := proc(n)
        add(1/k,k=1..n) ;
        numer(%) ;
    end proc:
    seq( A001008(n),n=1..40) ; # Zerinvary Lajos, Mar 28 2007; R. J. Mathar, Dec 02 2016
  • Mathematica
    Table[Numerator[HarmonicNumber[n]], {n, 30}]
    (* Procedure generating A[1,n](m) (see Comments section) *) m =1; aa = {}; Do[k = 0; Do[k = k + m^(r - d)/d, {d, 1, r - 1}]; AppendTo[aa, k], {r, 1, 20}]; aa (* Artur Jasinski, Oct 16 2008 *)
    Numerator[Accumulate[1/Range[25]]] (* Alonso del Arte, Nov 21 2018 *)
    Numerator[Table[((n - 1)/2)*HypergeometricPFQ[{1, 1, 2 - n}, {2, 3}, 1] + 1, {n, 1, 29}]] (* Artur Jasinski, Jan 08 2021 *)
  • PARI
    A001008(n) = numerator(sum(i=1,n,1/i)) \\ Michael B. Porter, Dec 08 2009
    
  • PARI
    H1008=List(1); A001008(n)={for(k=#H1008,n-1,listput(H1008,H1008[k]+1/(k+1))); numerator(H1008[n])} \\ about 100x faster for n=1..1500. - M. F. Hasler, Jul 03 2019
    
  • Python
    from sympy import Integer
    [sum(1/Integer(i) for i in range(1, n + 1)).numerator() for n in range(1, 31)]  # Indranil Ghosh, Mar 23 2017
    
  • 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 A001008(n): H = harmonic(1,n+1); return numerator(H[0]/H[1])
    [A001008(n) for n in (1..29)] # Peter Luschny, Sep 01 2012
    

Formula

H(n) ~ log n + gamma + O(1/n). [See Hardy and Wright, Th. 422.]
log n + gamma - 1/n < H(n) < log n + gamma + 1/n [follows easily from Hardy and Wright, Th. 422]. - David Applegate and N. J. A. Sloane, Oct 14 2008
G.f. for H(n): log(1-x)/(x-1). - Benoit Cloitre, Jun 15 2003
H(n) = sqrt(Sum_{i = 1..n} Sum_{j = 1..n} 1/(i*j)). - Alexander Adamchuk, Oct 24 2004
a(n) is the numerator of Gamma/n + Psi(1 + n)/n = Gamma + Psi(n), where Psi is the digamma function. - Artur Jasinski, Nov 02 2008
H(n) = 3/2 + 2*Sum_{k = 0..n-3} binomial(k+2, 2)/((n-2-k)*(n-1)*n), n > 1. - Gary Detlefs, Aug 02 2011
H(n) = (-1)^(n-1)*(n+1)*n*Sum_{k = 0..n-1} k!*Stirling2(n-1, k) * Stirling1(n+k+1,n+1)/(n+k+1)!. - Vladimir Kruchinin, Feb 05 2013
H(n) = n*Sum_{k = 0..n-1} (-1)^k*binomial(n-1,k)/(k+1)^2. (Wenchang Chu) - Gary Detlefs, Apr 13 2013
H(n) = (1/2)*Sum_{k = 1..n} (-1)^(k-1)*binomial(n,k)*binomial(n+k, k)/k. (H. W. Gould) - Gary Detlefs, Apr 13 2013
E.g.f. for H(n) = a(n)/A002805(n): (gamma + log(x) - Ei(-x)) * exp(x), where gamma is the Euler-Mascheroni constant, and Ei(x) is the exponential integral. - Vladimir Reshetnikov, Apr 24 2013
H(n) = residue((psi(-s)+gamma)^2/2, {s, n}) where psi is the digamma function and gamma is the Euler-Mascheroni constant. - Jean-François Alcover, Feb 19 2014
H(n) = Sum_{m >= 1} n/(m^2 + n*m) = gamma + digamma(1+n), numerators and denominators. (see Mathworld link on Digamma). - Richard R. Forberg, Jan 18 2015
H(n) = (1/2) Sum_{j >= 1} Sum_{k = 1..n} ((1 - 2*k + 2*n)/((-1 + k + j*n)*(k + j*n))) + log(n) + 1/(2*n). - Dimitri Papadopoulos, Jan 13 2016
H(n) = (n!)^2*Sum_{k = 1..n} 1/(k*(n-k)!*(n+k)!). - Vladimir Kruchinin, Mar 31 2016
a(n) = Stirling1(n+1, 2) / gcd(Stirling1(n+1, 2), n!) = A000254(n) / gcd(A000254(n), n!). - Max Alekseyev, Mar 01 2018
From Peter Bala, Jan 31 2019: (Start)
H(n) = 1 + (1 + 1/2)*(n-1)/(n+1) + (1/2 + 1/3)*(n-1)*(n-2)/((n+1)*(n+2)) + (1/3 + 1/4)*(n-1)*(n-2)*(n-3)/((n+1)*(n+2)*(n+3)) + ... .
H(n)/n = 1 + (1/2^2 - 1)*(n-1)/(n+1) + (1/3^2 - 1/2^2)*(n-1)*(n-2)/((n+1)*(n+2)) + (1/4^2 - 1/3^2)*(n-1)*(n-2)*(n-3)/((n+1)*(n+2)*(n+3)) + ... .
For odd n >= 3, (1/2)*H((n-1)/2) = (n-1)/(n+1) + (1/2)*(n-1)*(n-3)/((n+1)*(n+3)) + 1/3*(n-1)*(n-3)*(n-5)/((n+1)*(n+3)*(n+5)) + ... . Cf. A195505. See the Bala link in A036970. (End)
H(n) = ((n-1)/2) * hypergeom([1,1,2-n], [2,3], 1) + 1. - Artur Jasinski, Jan 08 2021
Conjecture: for nonzero m, H(n) = (1/m)*Sum_{k = 1..n} ((-1)^(k+1)/k) * binomial(m*k,k)*binomial(n+(m-1)*k,n-k). The case m = 1 is well-known; the case m = 2 is given above by Detlefs (dated Apr 13 2013). - Peter Bala, Mar 04 2022
a(n) = the (reduced) numerator 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
H(n) = Sum_{k=1..n} (-1)^(k-1)*binomial(n,k)/k (H. W. Gould). - Gary Detlefs, May 28 2024

Extensions

Edited by Max Alekseyev, Oct 21 2011
Changed title, deleting the incorrect name "Wolstenholme numbers" which conflicted with the definition of the latter in both Weisstein's World of Mathematics and in Wikipedia, as well as with OEIS A007406. - Stanislav Sykora, Mar 25 2016

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

A025547 Least common multiple of {1,3,5,...,2n-1}.

Original entry on oeis.org

1, 3, 15, 105, 315, 3465, 45045, 45045, 765765, 14549535, 14549535, 334639305, 1673196525, 5019589575, 145568097675, 4512611027925, 4512611027925, 4512611027925, 166966608033225, 166966608033225, 6845630929362225, 294362129962575675, 294362129962575675
Offset: 1

Views

Author

Keywords

Comments

This sequence coincides with the sequence f(n) = denominator of 1 + 1/3 + 1/5 + 1/7 + ... + 1/(2n-1) iff n <= 38. But a(39) = 6414924694381721303722858446525, f(39) = 583174972216520118520259858775. - T. D. Noe, Aug 04 2004 [See A350670(n-1).]
Coincides for n=1..42 with the denominators of a series for Pi*sqrt(2)/4 and then starts to differ. See A127676.
a(floor((n+1)/2)) = gcd(a(n), A051426(n)). - Reinhard Zumkeller, Apr 25 2011
A051417(n) = a(n+1)/a(n).

Crossrefs

Cf. A007509, A025550, A075135. The numerators are in A074599.
Cf. A003418 (LCM of {1..n}).

Programs

  • Haskell
    a025547 n = a025547_list !! (n-1)
    a025547_list = scanl1 lcm a005408_list
    -- Reinhard Zumkeller, Oct 25 2013, Apr 25 2011
    
  • Maple
    A025547:=proc(n) local i,t1; t1:=1; for i from 1 to n do t1:=lcm(t1,2*i-1); od: t1; end;
    f := n->denom(add(1/(2*k-1),k=0..n)); # a different sequence!
  • Mathematica
    a = 1; Join[{1}, Table[a = LCM[a, n], {n, 3, 125, 2}]] (* Zak Seidov, Jan 18 2011 *)
    nn=30;With[{c=Range[1,2*nn,2]},Table[LCM@@Take[c,n],{n,nn}]] (* Harvey P. Dale, Jan 27 2013 *)
  • PARI
    a(n)=lcm(vector(n,k,2*k-1)) \\ Charles R Greathouse IV, Nov 20 2012
    
  • Python
    # generates initial segment of sequence
    from math import gcd
    from itertools import accumulate
    def lcm(a, b): return a * b // gcd(a, b)
    def aupton(nn): return list(accumulate((2*i+1 for i in range(nn)), lcm))
    print(aupton(23)) # Michael S. Branicky, Mar 28 2022

A025550 a(n) = ( 1/1 + 1/3 + 1/5 + ... + 1/(2*n-1) )*LCM(1, 3, 5, ..., 2*n-1).

Original entry on oeis.org

1, 4, 23, 176, 563, 6508, 88069, 91072, 1593269, 31037876, 31730711, 744355888, 3788707301, 11552032628, 340028535787, 10686452707072, 10823198495797, 10952130239452, 409741429887649, 414022624965424, 17141894231615609, 743947082888833412, 750488463554668427
Offset: 1

Views

Author

Keywords

Comments

Or, numerator of 1/1 + 1/3 + ... + 1/(2n-1) up to a(38).
Following similar remark by T. D. Noe in A025547, this coincides with f(n) = numerator of 1 + 1/3 + 1/5 + 1/7 + ... + 1/(2n-1) iff n <= 38. But a(39) = 18048708369314455836683437302413, f(39) = 1640791669937677803334857936583. Note that f(n) = numerator(digamma(n+1/2)/2 + log(2) + euler_gamma/2). - Paul Barry, Aug 19 2005 [See A350669(n-1).]
2*(1 + 1/3 + ... + 1/(2*n-1))/Pi = 2*a(n)/(A025547(n)*Pi) is the equivalent resistance between the points (0,0) and (n,n) on a 2-dimension infinite square grid of unit resistors. - Jianing Song, Apr 28 2025

Crossrefs

Programs

  • Haskell
    a025550 n = numerator $ sum  $ map (1 %) $ take n [1, 3 ..]
    -- Reinhard Zumkeller, Jan 22 2012
    
  • Magma
    [&+[1/d: d in i]*Lcm(i) where i is [1..2*n-1 by 2]: n in [1..21]]; // Bruno Berselli, Apr 16 2015
  • Maple
    a:= n-> (f-> add(1/p, p=f)*ilcm(f[]))([2*i-1$i=1..n]):
    seq(a(n), n=1..40);  # Alois P. Heinz, Apr 16 2015
  • Mathematica
    Table[(Total[1/Range[1,2n-1,2]])LCM@@Range[1,2n-1,2],{n,30}] (* Harvey P. Dale, Sep 09 2020 *)
  • PARI
    a(n)=my(v=vector(n,i,2*i-1));sum(i=1,#v,1/v[i])*lcm(v) \\ Charles R Greathouse IV, Feb 28 2013
    

Formula

1 + 1/3 + ... + 1/(2*n-1) = a(n)/A025547(n) = A350669(n-1)/A350670(n-1). - Jianing Song, Apr 28 2025

Extensions

Value of a(39) corrected by Jean-François Alcover, Apr 16 2015

A051536 a(n) = least common multiple of {1, 4, 7, 10, 13 ..., 3n+1} (A016777).

Original entry on oeis.org

1, 4, 28, 140, 1820, 7280, 138320, 1521520, 7607600, 7607600, 235835600, 4009205200, 148340592400, 148340592400, 6378645473200, 146708845883600, 1026961921185200, 1026961921185200, 1026961921185200, 29781895714370800
Offset: 0

Views

Author

Keywords

Comments

This sequence coincides with the sequence of denominators of 1 + 1/4 + 1/7 + 1/10 + ... + 1/(3*n + 1) for n < 29. - T. D. Noe, Aug 04 2004
The sequence coincides with the sequence of denominators of 1 - 1/4 + 1/7 - 1/10 + ... + (-1)^n/(3*n + 1) for n < 45. - Peter Bala, Feb 19 2024

Examples

			a(4) = lcm of {1, 4, 7, 10, 13} = 1820.
		

Crossrefs

Cf. A016777.
The numerators are in A074596.

Programs

  • Haskell
    a051536 n = a051536_list !! (n-1)
    a051536_list = scanl1 lcm a016777_list
    -- Reinhard Zumkeller, Feb 28 2013, Feb 10 2012
    
  • Magma
    k:=58; [Lcm([h: h in [1..j by 3]]): j in [1..k by 3]]; // Bruno Berselli, May 03 2011
    
  • Mathematica
    Table[ Denominator[ Sum[1/i, {i, 1/3, n}]], {n, 1, 20}]
    Table[ Apply[ LCM, Join[{1}, Table[1 + 3i, {i, 0, n}]]], {n, 0, 19}]
    Table[Denominator[Total[1/Range[1, 3n+1, 3]]], {n, 0, 29}]
    Module[{nn=30,lst},lst=3*Range[0,nn]+1;Table[LCM@@Take[lst,n],{n,nn}]] (* Harvey P. Dale, Sep 30 2012 *)
  • PARI
    a(n)=lcm(vector(n,i,3*i+1)) \\ Charles R Greathouse IV, Feb 09 2017

Extensions

Edited by Robert G. Wilson v, Aug 27 2002

A075188 Number of times that the numerator of a sum generated from the set 1, 1/2, 1/3,..., 1/n is prime.

Original entry on oeis.org

0, 1, 3, 9, 19, 43, 79, 162, 307, 607, 1075, 2186, 3872, 7573, 15101, 29139, 52295, 104953, 189915, 379275, 754081, 1462115, 2675851, 5351541, 10254019, 19987942, 38901233, 77620568, 144021667, 288428481, 537642772, 1056802340, 2113152353, 4138261885
Offset: 1

Views

Author

T. D. Noe, Sep 08 2002

Keywords

Comments

Note that for each n there are only 2^(n-1) new sums to consider. Surprisingly, nearly half of the sums have a prime numerator. For the number of distinct primes, see A075189. For the largest generated prime, see A075226. For the smallest odd prime not generated, see A075227.
A217712(n) = number of primes occurring exactly once as numerators. - Reinhard Zumkeller, Jun 02 2013

Examples

			a(3) = 3 because 3 sums yield prime numerators: 1+1/2 = 3/2, 1/2+1/3 = 5/6 and 1+1/2+1/3 = 11/6.
		

Crossrefs

Programs

  • Haskell
    import Data.Ratio (numerator)
    a075188 n = a075188_list !! (n-1)
    a075188_list = f 1 [] where
       f x hs = (length $ filter ((== 1) . a010051') (map numerator hs')) :
                f (x + 1) hs' where hs' = hs ++ map (+ recip x) (0 : hs)
    -- Reinhard Zumkeller, May 28 2013
  • Mathematica
    Needs["DiscreteMath`Combinatorica`"]; maxN=20; For[cnt=0; lst={}; i=0; n=1, n<=maxN, n++, While[i<2^n-1, i++; s=NthSubset[i, Range[n]]; k=Numerator[Plus@@(1/s)]; If[PrimeQ[k], cnt++ ]]; AppendTo[lst, cnt]]; lst

Extensions

a(21)-a(25) by Reinhard Zumkeller, May 28 2013
a(26)-a(31) from Chai Wah Wu, Feb 14 2022
a(32)-a(34) from Sean A. Irvine, Feb 10 2025

A075189 Number of distinct primes in the numerator of the 2^n sums generated from the set 1, 1/2, 1/3, ..., 1/n.

Original entry on oeis.org

0, 1, 3, 6, 14, 20, 38, 74, 134, 232, 486, 526, 1078, 2036, 2505, 4762, 9929, 14598, 29831, 31521, 52223, 101123, 207892, 215796, 426772, 836665, 1640357, 1689653, 3401483, 3471770, 6868800, 13470379, 23182192, 45792615, 47136366
Offset: 1

Views

Author

T. D. Noe, Sep 08 2002

Keywords

Comments

Every prime is generated eventually. For the largest generated prime, see A075226. For the smallest odd prime not generated, see A075227.
A217712(n) = number of primes occurring exactly once as numerators among the 2^n sums. - Reinhard Zumkeller, Jun 02 2013

Examples

			a(3) = 3 because 3 sums yield distinct prime numerators: 1+1/2 = 3/2, 1/2+1/3 = 5/6 and 1+1/2+1/3 = 11/6.
		

Crossrefs

Programs

  • Haskell
    import Data.Ratio ((%), numerator)
    import Data.Set (Set, empty, fromList, toList, union, size)
    a075189 n = a075189_list !! (n-1)
    a075189_list = f 1 empty empty where
       f x s s1 = size s1' : f (x + 1) (s `union` fromList hs) s1' where
         s1' = s1 `union` fromList
               (filter ((== 1) . a010051') $ map numerator hs)
         hs = map (+ 1 % x) $ 0 : toList s
    -- Reinhard Zumkeller, May 28 2013
  • Mathematica
    Needs["DiscreteMath`Combinatorica`"]; maxN=20; For[lst={}; prms={}; i=0; n=1, n<=maxN, n++, While[i<2^n-1, i++; s=NthSubset[i, Range[n]]; k=Numerator[Plus@@(1/s)]; If[PrimeQ[k], prms=Union[prms, {k}]]]; AppendTo[lst, Length[prms]]]; lst

Extensions

a(21)-a(29) from Reinhard Zumkeller, May 28 2013
a(30)-a(35) from Sean A. Irvine, Feb 10 2025
Showing 1-10 of 25 results. Next