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-6 of 6 results.

A058312 Denominator of the n-th alternating harmonic number, Sum_{k=1..n} (-1)^(k+1)/k.

Original entry on oeis.org

1, 2, 6, 12, 60, 60, 420, 840, 2520, 2520, 27720, 27720, 360360, 360360, 72072, 144144, 2450448, 2450448, 46558512, 232792560, 232792560, 232792560, 5354228880, 5354228880, 26771144400, 26771144400, 80313433200, 11473347600
Offset: 1

Views

Author

N. J. A. Sloane, Dec 09 2000

Keywords

Comments

a(n) is a divisor of A003418(n). The first time this is a proper divisor, is a(15); see A269626. - Jeppe Stig Nielsen, Mar 01 2016

Examples

			1, 1/2, 5/6, 7/12, 47/60, 37/60, 319/420, 533/840, 1879/2520, ...
		

Crossrefs

Numerators are A058313. Cf. A025530.
Cf. A002805 (denominator of n-th harmonic number).

Programs

  • Haskell
    import Data.Ratio((%), denominator)
    a058312 n = a058312_list !! (n-1)
    a058312_list = map denominator $ scanl1 (+) $
                       map (1 %) $ tail a181983_list
    -- Reinhard Zumkeller, Mar 20 2013
  • Maple
    A058313 := n->denom(add((-1)^(k+1)/k,k=1..n));
    # Alternatively:
    a := n -> denom(harmonic(n) - harmonic((n-modp(n,2))/2)):
    seq(a(n), n=1..28); # Peter Luschny, May 03 2016
  • Mathematica
    a[n_] := Sum[(-1)^(k+1)/k, {k, 1, n}]; Table[a[n] // Denominator, {n, 1, 30}] (* Jean-François Alcover, May 26 2015 *)
    a[n_]:= (-1)^n(HarmonicNumber[n/2-1/2]-HarmonicNumber[n/2]+(-1)^n Log[4])/2; Table[a[n] // FullSimplify, {n, 1, 29}] // Denominator (* Gerry Martens, Jul 05 2015 *)
    Rest[Denominator[CoefficientList[Series[Log[1 + x]/(1 - x),{x, 0, 33}], x]]] (* Vincenzo Librandi, Jul 06 2015 *)
  • PARI
    a(n)=denominator(polcoeff(-log(1-x)/(x+1)+O(x^(n+1)),n))
    
  • PARI
    a(n)=denominator(sum(k=1,n,(-1)^(k+1)/k)) \\ Jeppe Stig Nielsen, Mar 01 2016
    

Formula

G.f. for A058313(n)/ A058312(n): log(1+x)/(1-x). - Benoit Cloitre, Jun 15 2003
a(n) = n*a(n-1)/gcd(n*a(n-1), n*A058313(n-1)+(-1)^(n-1)*a(n-1)). - Robert Israel, Jul 05 2015
a(n) = the (reduced) denominator of the continued fraction 1/(1 + 1^2/(1 + 2^2/(1 + 3^2/(1 + ... + (n-1)^2/(1))))). - Peter Bala, Feb 18 2024

A126197 GCDs arising in A126196.

Original entry on oeis.org

11, 1093, 1093, 3511, 3511, 5557, 104891, 1006003
Offset: 1

Views

Author

Max Alekseyev and Tanya Khovanova, Mar 07 2007

Keywords

Comments

All terms are primes. Note a connection to the Wieferich primes A001220: a(2) = a(3) = A001220(1), a(3) = a(4) = A001220(2).
From John Blythe Dobson, Jan 14 2017: (Start)
All Wieferich primes p will belong to this sequence twice, because if H([p/k]) denotes the harmonic number with index floor(p/k), then p divides all of H([p/4]), H([p/2]), and H(p-1). The first two of these elements gives one solution, and the second and third another. This property of the Wieferich primes predates their name, and was apparently first proved by Glaisher in "On the residues of r^(p-1) to modulus p^2, p^3, etc.," pp. 21-22, 23 (see References).
Note also a connection to the Mirimanoff primes A014127: a(1) = A014127(1), a(8) = A014127(2). All Mirimanoff primes p will belong to this sequence, because p divides both H([p/3]) and H([2p/3]). This property of the Mirimanoff primes likewise predates their name, and was apparently first proved by Glaisher in "A general congruence theorem relating to the Bernoullian function," p. 50 (see Links).
The Wieferich primes and Mirimanoff primes would seem to be the only cases for which the value of n in A126196(n) is predictable from knowledge of p. It is not obvious that all members of the present sequence are prime; however, by definition all their divisors must be non-harmonic primes A092102. Furthermore, it is clear from the cited literature under that entry that H([n/2]) == H(n) == 0 (mod p) is only possible when n < p. Thus, all divisors of the present sequence must belong to the harmonic irregular primes A092194.
One possible reason for interest in this sequence is a 1995 result of Dilcher and Skula (see Links) which among other things shows that if a prime p were an exception to the first case of Fermat's Last Theorem, then p would divide both H([p/k]) and H([2p/k]) for every value of k from 2 to 46. To date, the only values for which such coincidences have been found have k = 2, 3, or 4. For k = 6 to hold, p would have to be simultaneously a Wieferich prime and a Mirimanoff prime, while for k = 5 to hold, p would have to be simultaneously a Wall-Sun-Sun prime and a member of A123692. The sparse numerical results for the present sequence suggest that even the more relaxed condition H([n/2]) == H(n) == 0 (mod p) is rarely satisfied. (End)

References

  • J. W. L. Glaisher, On the residues of r^(p-1) to modulus p^2, p^3, etc., Quarterly Journal of Pure and Applied Mathematics 32 (1900-1901), 1-27.

Crossrefs

Programs

  • Mathematica
    f[n_] := GCD @@ Numerator@ HarmonicNumber@ {n, Floor[n/2]}; f@ Select[ Range[5000], f[#] > 1 &] (* Giovanni Resta, May 13 2016 *)

Extensions

a(8) from Giovanni Resta, May 13 2016

A125581 Numbers n such that n does not divide the denominator of the n-th harmonic number nor the denominator of the n-th alternating harmonic number.

Original entry on oeis.org

77, 847, 9317, 102487, 596778, 1127357, 1193556, 6161805, 12323610, 12400927
Offset: 1

Views

Author

Alexander Adamchuk, Jan 03 2007

Keywords

Comments

Note that a(1) = 7*11, a(2) = 7*11^2, and a(3) = 7*11^3.
Harmonic numbers are defined as H(n) = Sum_{k=1..n} 1/k = A001008(n)/A002805(n).
Alternating harmonic numbers are defined as H'(n) = Sum_{k=1..n} (-1)^(k+1)*1/k = A058313(n)/A058312(n).
Numbers n such that n does not divide the denominator of the n-th harmonic number are listed in A074791. Numbers n such that n does not divide the denominator of the n-th alternating harmonic number are listed in A121594.
This sequence is the intersection of A074791 and A121594.
Comments from Max Alekseyev, Mar 07 2007: (Start)
While A125581 indeed contains the geometric progression 7*11^n as a subsequence, it also contains other geometric progressions such as: 546*1093^n, 1092*1093^n, 1755*3511^n, 3510*3511^n and 4896*5557^n (see A126196 and A126197). It may also contain some "isolated" terms (i.e. not participating in the geometric progressions) but such terms are harder to find and at the moment I have no proof that they exist.
This is a sketch of my proof that geometric progression 7*11^n and the others mentioned above belong to A125581.
Lemma 1. H'(n) = H(n) - H([n/2]).
Lemma 2. For prime p and integer n >= p, valuation(H(n),p) >= valuation(H([n/p]),p) - 1.
Theorem. For an integer b > 1 and a prime number p such that p divides the numerators of both H(b) and H([b/2]), the geometric progression b*p^n belongs to A125581.
Proof. It is enough to show that valuation(H(b*p^n),p) > -n and valuation(H'(b*p^n), p) > -n. By Lemma 2 we have valuation(H(b*p^n), p) >= valuation(H(b), p) - n >= 1 - n > -n.
From this inequality and Lemma 1, we have valuation(H'(b*p^n), p) >= min{ valuation(H(b*p^n), p), valuation(H([b*p^n/2]), p) } >= min{ 1 - n, valuation(H([b*p^n/2]), p) }. It remains to show that valuation(H([b*p^n/2]), p) >= 1 - n.
Again by Lemma 2, we have valuation(H([b*p^n/2]), p) >= valuation(H([b/2]), p) - n >= 1 - n, which completes the proof.
It is easy to check that this Theorem holds for the aforementioned geometric progressions. (End)

Crossrefs

Programs

  • Mathematica
    f=0; g=0; Do[g=g+1/n; f=f+(-1)^(n+1)/n; If[ !IntegerQ[Denominator[g]/n]&&!IntegerQ[Denominator[f]/n], Print[n]], {n, 1, 10000}]

Extensions

More terms from Max Alekseyev, Mar 11 2007
a(8)-a(10) from Max Alekseyev, Mar 19 2007

A126196 Numbers k such that gcd(A001008(k), A001008(floor(k/2))) > 1.

Original entry on oeis.org

7, 546, 1092, 1755, 3510, 4896, 52447, 670668
Offset: 1

Views

Author

Max Alekseyev and Tanya Khovanova, Mar 07 2007, corrected Mar 10 2007

Keywords

Comments

Note a connection to the Wieferich primes A001220: a(2) = (A001220(1) - 1)/2, a(3) = A001220(1) - 1, a(4) = (A001220(2) - 1)/2, a(5) = A001220(2) - 1. [Comment regarding a(2) added by Kevin J. Gomez, Jul 11 2017]
a(9) > 840000. - Giovanni Resta, May 13 2016

Crossrefs

The corresponding GCDs are given by A126197.

Programs

  • Mathematica
    Select[Range[5000], GCD @@ Numerator@ HarmonicNumber@{#, Floor[#/2]} > 1 &] (* Giovanni Resta, May 13 2016 *)
  • PARI
    a001008(n)=numerator(sum(i=1, n, 1/i))
    for(n=1, 1e6, if(gcd(a001008(n), a001008(n/2)) > 1, print1(n, ", "))) \\ Felix Fröhlich, Aug 08 2014

Extensions

a(8) from Giovanni Resta, May 13 2016

A119788 Ratio of the numerator of the product of n and the n-th alternating harmonic number n*H'(n) to the numerator of the n-th alternating harmonic number H'(n) = Sum_{k=1..n} (-1)^(k+1)*1/k.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13
Offset: 1

Views

Author

Alexander Adamchuk, Jun 26 2006, Sep 21 2006

Keywords

Comments

Indices n such that a(n) is not equal to 1 are listed in A121594.
It appears that most a(n) > 1 are a prime divisor of their corresponding indices A121594(n). The first and only composite term up to a(6000) is a(1470) = 49 that also divides its index.
A compressed version of this sequence (all 1 entries are excluded) is A121595.

Crossrefs

Programs

  • Mathematica
    Numerator[Table[n*Sum[(-1)^(i+1)*1/i, {i, 1, n}],{n,1,600}]]/Numerator[Table[Sum[(-1)^(i+1)*1/i, {i, 1, n}], {n,1,600}]]

Formula

a(n) = numerator(n*Sum_{i=1..n} (-1)^(i+1)*1/i) / numerator(Sum_{i=1..n}(-1)^(i+1)*1/i).
a(n) = A119787(n) / A058313(n).

A121595 Compressed version of A119788 (all entries equal to 1 are excluded).

Original entry on oeis.org

5, 7, 5, 11, 13, 17, 7, 29, 7, 37, 19, 47, 119, 41, 23, 5, 29, 31, 11, 37, 37, 41, 43, 71, 13, 7, 13, 13, 47, 13, 49, 7, 7, 7, 53, 5, 79, 59, 97, 61, 71, 103, 67, 17, 71, 61, 73, 139, 17, 17, 79, 19, 19, 19, 83, 19, 151, 89, 29, 29, 263, 97
Offset: 1

Views

Author

Alexander Adamchuk, Aug 09 2006

Keywords

Comments

Also the ratio of the numerators of n*H'(n) = A119787(n) and H'(n) = A058313(n) when they are different. (H'(n) is the alternating harmonic number H'(n) = Sum_{k=1..n} (-1)^(k+1)*1/k.)
The ratio of numerators A119787(n)/A058313(n) for n = 1..400 is given in A119788(n).
It appears that most a(n) are prime divisors of the corresponding indices A121594(n).
The first and only composite a(n) up to A119788(6000) is a(31) = 49 corresponding to A119788(1470).
It appears that all a(n) belong to A092579(n), which is a sieve using the Fibonacci sequence over the integers >= 2. [Edited by Petros Hadjicostas, May 11 2020]

Crossrefs

Programs

  • Mathematica
    Do[H=Sum[(-1)^(i+1)*1/i, {i, 1, n}]; a=Numerator[n*H]; b=Numerator[H]; If[ !Equal[a,b],Print[{n,a/b}]], {n,1,6000}]

Formula

a(n) = A119788(A121594(n)), while the corresponding indices are given in A121594(n).
Showing 1-6 of 6 results.