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

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

A067657 Prime values of A001008, the numerators of the harmonic numbers.

Original entry on oeis.org

3, 11, 137, 761, 7129, 18858053, 34395742267, 85691034670497533, 252476961434436524654789, 928551009361054917576341971, 42409610330030873613929048033, 4868007055309996043055960217131137
Offset: 1

Views

Author

Benoit Cloitre, Feb 03 2002

Keywords

Comments

This sequence comprises the only primes for which 1/Sum_{k=1..c}(1/(a(n)*k)) is an integer for some c >= 2, yielding A002805(A056903(n)) for c = A056903(n). E.g. for n = 2: a(2) = 11, A056903(2) = 3, and 1 / (1/11 + 1/22 + 1/33) = 6 = A002805(A056903(2)). - Charles L. Hohn, Apr 02 2025

Crossrefs

Programs

  • Mathematica
    Table[ HarmonicNumber[n], {n, 0, 80}] // Numerator // Select[#, PrimeQ]& (* Jean-François Alcover, May 27 2013 *)

Formula

A001008 INTERSECT A000040.
a(n) = A001008(A056903(n)). - Amiram Eldar, Jun 02 2022

A072984 Least k such that prime(n) appears in the factorization of A001008(k) (the numerator of the k-th harmonic number).

Original entry on oeis.org

2, 4, 6, 3, 12, 16, 18, 22, 13, 30, 17, 40, 13, 46, 22, 58, 10, 66, 70, 72, 78, 82, 88, 11, 100, 102, 106, 25, 112, 126, 130, 5, 138, 148, 150, 156, 162, 166, 71, 178, 180, 190, 192, 196, 38, 210, 222, 22, 228, 232, 238, 240, 250, 66, 262, 33, 58, 276, 280, 282
Offset: 2

Views

Author

Benoit Cloitre, Aug 21 2002

Keywords

Comments

a(n)<=n for n =2,5,14,18,25,29,33,46,49,...
For p = prime(n), Boyd defines J_p to be the set of numbers k such that p divides A001008(k). This sequence gives the smallest elements of J_p. The largest elements of J_p are given by A177734. The sizes of J_p are given by A092103.

Crossrefs

Cf. A092101 (harmonic primes), A092102 (non-harmonic primes), A092103 (size of Jp).

Programs

  • Mathematica
    A072984[n_] := Module[{p, k, sum},
       p = Prime[n]; k = 1; sum = 1/k;
       While[! Divisible[Numerator[sum], p],
        k++; sum += 1/k];
       Return[k]];
    Table[A072984[n], {n, 2, 61}] (* Robert Price, May 01 2019 *)
  • PARI
    a(n)=if(n<0,0,s=1; while(numerator(sum(k=1,s,1/k))%prime(n)>0,s++); s)

A092103 Number of values of k for which prime(n) divides A001008(k), the numerator of the k-th harmonic number.

Original entry on oeis.org

3, 3, 13, 638, 3, 3, 25, 3, 18, 26, 15, 3, 27, 24, 17, 23, 13, 3, 45, 3, 3, 43038, 7, 74, 44, 63, 3, 1273, 3, 3515, 7, 38, 3, 3, 7, 3, 74, 526, 288, 3, 19, 3, 3, 41, 11, 59, 3, 31, 65, 176, 3, 3, 3, 20, 3, 106, 55, 3, 3, 89, 3, 3, 3, 79, 3, 3, 3, 47, 3, 21, 253, 29, 7, 79, 41, 19, 701533, 13, 9, 703, 23, 3, 205, 105, 3, 3, 323, 3, 7, 3, 3, 3, 3, 3, 3, 13, 1763
Offset: 2

Views

Author

T. D. Noe, Feb 20 2004

Keywords

Comments

For p = prime(n), Boyd defines J_p to be the set of numbers k such that p divides A001008(k). This sequence gives the size of J_p. A072984 and A177734 give the smallest and largest elements of J_p, respectively.
A092101 gives primes prime(n) such that a(n) = 3 (i.e., a(A000720(A092101(m))) = 3 for all m). A092102 gives primes prime(n) such that a(n) > 3.
From Carlo Sanna, Apr 06 2016: (Start)
Eswarathasan and Levine conjectured that for any prime number p the set J_p is finite.
I proved that if J_p(x) is the number of integers in J_p that are less than x > 1, then J_p(x) < 129 p^(2/3) x^0.765 for any prime p. In particular, J_p has asymptotic density zero. (End)
Bing-Ling Wu and Yong-Gao Chen improved Sanna's (see previous comment) result showing that J_p(x) <= 3 x^(2/3 + 1/(25 log p)) for any prime p and any x > 1. - Carlo Sanna, Jan 12 2017

Examples

			a(2) = 3 because 3 divides A001008(k) for k = 2, 7, and 22.
a(4) = 13 because 7 divides A001008(k) for only the 13 values k = 6, 42, 48, 295, 299, 337, 341, 2096, 2390, 14675, 16731, 16735, and 102728. This is the 4th row in A229493.
		

Crossrefs

Cf. A092193 (number of generations for each prime).
Cf. A229493 (terms for each prime).

Extensions

a(8), a(15), and a(17) corrected by Max Alekseyev, Oct 23 2012
Terms a(23) onward from Carofiglio et al. (2025) added by Max Alekseyev, Apr 01 2025

A052488 a(n) = floor(n*H(n)) where H(n) is the n-th harmonic number, Sum_{k=1..n} 1/k (A001008/A002805).

Original entry on oeis.org

1, 3, 5, 8, 11, 14, 18, 21, 25, 29, 33, 37, 41, 45, 49, 54, 58, 62, 67, 71, 76, 81, 85, 90, 95, 100, 105, 109, 114, 119, 124, 129, 134, 140, 145, 150, 155, 160, 165, 171, 176, 181, 187, 192, 197, 203, 208, 214, 219, 224, 230, 235, 241, 247, 252, 258, 263, 269
Offset: 1

Views

Author

Tomas Mario Kalmar (TomKalmar(AT)aol.com), Mar 15 2000

Keywords

Comments

Floor(n*H(n)) gives a (very) rough approximation to the n-th prime.
a(n) is the integer part of the solution to the Coupon Collector's Problem. For example, if there are n=4 different prizes to collect from cereal boxes and they are equally likely to be found, then the integer part of the average number of boxes to buy before the collection is complete is a(4)=8. - Ron Lalonde (ronronronlalonde(AT)hotmail.com), Feb 04 2004

References

  • John D. Barrow, One Hundred Essential Things You Didn't Know You Didn't Know, Ch. 3, 'On the Cards', W. W. Norton & Co., NY & London, 2008, pp. 30-32.

Crossrefs

Programs

  • Magma
    [Floor(n*HarmonicNumber(n)): n in [1..60]]; // G. C. Greubel, May 14 2019
    
  • Maple
    for n from 1 to 100 do printf(`%d,`,floor(n*sum(1/k, k=1..n))) od:
    # Alternatively:
    A052488:= n -> floor(n*(Psi(n+1)+gamma));
    seq(A052488(n),n=1..100); # Robert Israel, May 19 2014
  • Mathematica
    f[n_] := Floor[n*HarmonicNumber[n]]; Array[f, 60] (* Robert G. Wilson v, Nov 23 2015 *)
  • PARI
    a(n) = floor(n*sum(k=1, n, 1/k)) \\ Altug Alkan, Nov 23 2015
    
  • Python
    from math import floor
    n=100 #number of terms
    ans=0
    finalans = []
    for i in range(1, n+1):
        ans+=(1/i)
        finalans.append(floor(ans*i))
    print(finalans)
    # Adam Hugill, Feb 14 2022
    
  • Python
    from fractions import Fraction
    from itertools import count, islice
    def agen():
        Hn = 0
        for n in count(1):
            Hn += Fraction(1, n)
            yield (n*Hn.numerator)//Hn.denominator
    print(list(islice(agen(), 60))) # Michael S. Branicky, Aug 10 2022
    
  • Python
    from sympy import harmonic
    def A052488(n): return int(n*harmonic(n)) # Chai Wah Wu, Oct 24 2023
  • Sage
    [floor(n*harmonic_number(n)) for n in (1..60)] # G. C. Greubel, May 14 2019
    

Extensions

More terms from James Sellers, Mar 17 2000

A125854 Primes p with the property that p divides the Wolstenholme number A001008((p+1)/2).

Original entry on oeis.org

3, 29, 37, 3373, 2001907169
Offset: 1

Views

Author

Alexander Adamchuk, Dec 11 2006

Keywords

Comments

Note that if prime p>3 divides A001008((p+1)/2) then it also divides A001008((p-3)/2).
Note that for a prime p, H([p/2]) == 2*(2^(-p(p-1)) - 1)/p^2 (mod p). Therefore a prime p divides the Wolstenholme number A001008((p+1)/2) if and only if 2^(-p(p-1)) == 1 - p^2 (mod p^3) or, equivalently, 2^(p-1) == 1 + p (mod p^2).
Disjunctive union of the sequences A154998 and A121999 that contain primes congruent respectively to 1,3 and 5,7 modulo 8. (Alekseyev)
a(6) > 5.5*10^12. - Giovanni Resta, Apr 13 2017
Primes p that are base-((p-1)/2) Wieferich primes, that is, primes p such that ((p-1)/2)^(p-1) == 1 (mod p^2). - Jianing Song, Jan 27 2019

Examples

			a(1) = 3 because prime 3 divides A001008(2) = 3 and there is no p < 3 that divides A001008((p+1)/2).
a(2) = 29 because 29 divides A001008(15) = 1195757 and there is no prime p (3 < p < 29) that divides A001008((p+1)/2).
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[1, 5000]],
    Divisible[Numerator[HarmonicNumber[(# + 1)/2]], #] &] (* Robert Price, May 10 2019 *)

Extensions

Entry revised and a(5) = 2001907169 provided by Max Alekseyev, Jan 18 2009
Edited by Max Alekseyev, Oct 13 2009

A308967 Number of prime factors (with multiplicity) of the numerator A001008 of the harmonic number H(n) = Sum_{k=1..n} 1/k.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 3, 1, 1, 3, 2, 3, 3, 2, 2, 3, 2, 3, 2, 2, 1, 5, 2, 3, 2, 1, 3, 3, 3, 5, 2, 3, 2, 2, 2, 5, 2, 4, 2, 4, 1, 4, 3, 4, 3, 4, 4, 3, 2, 3, 3, 5, 2, 3, 2, 1, 3, 5, 2, 4, 2, 1, 4, 4, 4, 6, 4, 2, 1, 4, 4, 4, 3, 3, 4, 4, 5, 4, 1, 4, 3, 3, 4, 4, 3, 3, 4, 5, 1, 2, 1, 3, 2, 2, 3, 3, 3, 3, 3
Offset: 1

Views

Author

M. F. Hasler, Jul 03 2019

Keywords

Examples

			H(1) = 1 = 1/1, the numerator is the empty product, whence a(1) = 0.
H(2) = 1 + 1/2 = 3/2 and H(3) = 3/2 + 1/3 = 11/6, 3 and 11 are prime numbers, whence a(2) = a(3) = 1.
H(4) = 11/6 + 1/4 = 25/12, 25 = 5^2, whence a(4) = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[PrimeOmega @ Numerator[HarmonicNumber[n]], {n, 30}] (* Amiram Eldar, Feb 24 2020 *)
  • PARI
    a(n)=bigomega(A001008(n))

Formula

a(n) = A001222(A001008(n)).

A002547 Numerator of the n-th harmonic number H(n) divided by (n+1); a(n) = A001008(n) / ((n+1)*A002805(n)).

Original entry on oeis.org

1, 1, 11, 5, 137, 7, 363, 761, 7129, 671, 83711, 6617, 1145993, 1171733, 1195757, 143327, 42142223, 751279, 275295799, 55835135, 18858053, 830139, 444316699, 269564591, 34052522467, 34395742267, 312536252003, 10876020307, 9227046511387, 300151059037
Offset: 1

Views

Author

Keywords

Comments

Numerators of coefficients for numerical differentiation.

Examples

			H(n) = Sum_{k=1..n} 1/k, begins 1, 3/2, 11/6, 25/12, ... so H(n)/(n+1) begins 1/2, 1/2, 11/24, 5/12, ....
a(4) = numerator(H(4)/(4+1)) = 5.
		

References

  • W. G. Bickley and J. C. P. Miller, Numerical differentiation near the limits of a difference table, Phil. Mag., 33 (1942), 1-12 (plus tables).
  • A. N. Lowan, H. E. Salzer and A. Hillman, A table of coefficients for numerical differentiation, Bull. Amer. Math. Soc., 48 (1942), 920-924.
  • 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

Programs

  • GAP
    List([1..35], n-> NumeratorRat(Sum([1..n], k-> 1/k)/(n+1))); # G. C. Greubel, Jul 03 2019
  • Magma
    [Numerator(HarmonicNumber(n)/(n+1)): n in [1..35]]; // G. C. Greubel, Jul 03 2019
    
  • Maple
    H := proc(a, b) option remember; local m, p, q, r, s;
    if b - a <= 1 then return 1, a fi; m := iquo(a + b, 2);
    p, q := H(a, m); r, s := H(m, b); p*s + q*r, q*s; end:
    A002547 := proc(n) H(1, n+1); numer(%[1]/(%[2]*(n+1))) end:
    seq(A002547(n), n=1..30); # Peter Luschny, Jul 11 2019
  • Mathematica
    a[n_]:= Numerator[HarmonicNumber[n]/(n+1)]; Table[a[n], {n, 35}] (* modified by G. C. Greubel, Jul 03 2019 *)
  • PARI
    h(n) = sum(k=1, n, 1/k);
    vector(35, n, numerator(h(n)/(n+1))) \\ G. C. Greubel, Jul 03 2019
    
  • PARI
    A002547(n)=numerator(A001008(n)/(n+1)) \\ M. F. Hasler, Jul 03 2019
    
  • Sage
    [numerator(harmonic_number(n)/(n+1)) for n in (1..35)] # G. C. Greubel, Jul 03 2019
    

Formula

G.f.: (-log(1-x))^2 (for fractions A002547(n)/A002548(n)). - Barbara Margolius (b.margolius(AT)math.csuohio.edu), Jan 19 2002
A002547(n)/A002548(n) = 2*Stirling_1(n+2, 2)(-1)^n/(n+2)! - Barbara Margolius (b.margolius(AT)math.csuohio.edu), Jan 19 2002
Numerator of u(n) = Sum_{k=1..n-1} 1/(k*(n-k)) (u(n) is asymptotic to 2*log(n)/n). - Benoit Cloitre, Apr 12 2003; corrected by Istvan Mezo, Oct 29 2012
a(n) = numerator of 2*Integral_{0..1} x^(n+1)*log(x/(1-x)) dx. - Groux Roland, May 18 2011
a(n) = numerator of A001008(n)/(n+1), since A001008(n)/A002805(n) are already in lowest terms. - M. F. Hasler, Jul 03 2019

Extensions

More terms from Barbara Margolius (b.margolius(AT)math.csuohio.edu), Jan 19 2002
Simpler definition from Alexander Adamchuk, Oct 31 2004
Offset corrected by Gary Detlefs, Sep 08 2011
Definition corrected by M. F. Hasler, Jul 03 2019

A092193 Number of generations for which prime(n) divides A001008(k) for some k.

Original entry on oeis.org

4, 3, 7, 30, 3, 3, 8, 3, 5, 7, 4, 3, 5, 7, 6, 7, 4, 3, 8, 3, 3, 339, 4, 11, 10, 14, 3, 47, 3, 146, 4, 8, 3, 3, 4, 3, 20, 49, 33, 3, 6, 3, 3, 11, 5, 12, 3, 6, 17, 21, 3, 3, 3, 5, 3, 20, 18, 3, 3, 14, 3, 3, 3, 11, 3, 3, 3, 10, 3, 6, 35, 8, 4, 13, 11, 8, 1815, 5, 4, 52, 5, 3, 30, 11, 3, 3, 36, 3, 4, 3, 3, 3, 3, 3, 3, 4, 61, 4, 3, 3, 3, 3, 3, 8, 28, 4, 3, 6, 4, 6, 21, 19, 3, 94
Offset: 2

Views

Author

T. D. Noe, Feb 24 2004; corrected Jul 28 2004

Keywords

Comments

For any prime p, generation m consists of the numbers p^(m-1) <= k < p^m. The zeroth generation consists of just the number 0. When there is a k in generation m such that p divides A001008(k), then that k may generate solutions in generation m+1. It is conjectured that for all primes there are solutions for only a finite number of generations.
Boyd's table 3 states incorrectly that harmonic primes have 2 generations; harmonic primes have 3 generations.

Examples

			a(4)=7 because the fourth prime, 7, divides A001008(k) for k = 6, 42, 48, 295, 299, 337, 341, 2096, 2390, 14675, 16731, 16735 and 102728. These values of k fall into 6 generations; adding the zeroth generation makes a total of 7 generations.
		

Crossrefs

Cf. A072984 (least k such that prime(n) divides A001008(k)), A092101 (harmonic primes), A092102 (non-harmonic primes).

Extensions

a(8), a(15), a(17) corrected, and terms a(23) onward from Carofiglio et al. (2025) added by Max Alekseyev, Apr 01 2025

A256102 Numbers m such that gcd(A001008(m), m) > 1, in increasing order.

Original entry on oeis.org

20, 42, 77, 110, 156, 272, 342, 506, 812, 930, 1247, 1332, 1640, 1806, 2162, 2756, 3422, 3660, 4422, 4970, 5256, 6162, 6806, 7832, 9312, 9328, 10100, 10506, 11342, 11772, 12656, 16002, 17030, 18632, 19182, 22052, 22650, 24492, 26406, 27722, 29756, 31862, 32580, 36290, 37056, 38612, 39402
Offset: 1

Views

Author

Wolfdieter Lang, Apr 16 2015

Keywords

Comments

For the corresponding values of GCD(A001008(a(n)), a(n)) see A256103(n).
A001008(a(n))/A175441(a(n)) = A256103(n), n >= 1.
This means that for all values n not in the present sequence the numerator of the harmonic sum (HS) of the first n positive integers coincides with the denominator of the harmonic mean (HM) of the first n positive integers. That is, n divides the HM(n) numerator A102928(n) for n not in the present sequence.
Of course, HS(n)*HM(n) = n, n >= 1, where HS(n) = A001008(n)/A002805(n) and HM(n) = A102928(n)/A175441(n).
All terms are composite. Sequences contains all numbers of the form p*(p - 1), where p is a prime >= 5. This is because p^2 divides numerator(Sum_{i=1..p-1} 1/(k*p + i)), and p divides numerator(Sum_{i=1..p-1} 1/(i*p)), so p divides numerator(Sum_{i=1..p*(p-1)} 1/i). - Jianing Song, Dec 24 2018

Examples

			n = 1: gcd(A001008(20), 20) = gcd(55835135, 20) = 5 = A256103(1) > 1.
A001008(20)/A175441(20) = 55835135/11167027 = 5 = A256103(1).
Because 19 is not in this sequence 1 = gcd(A001008(19), 19) = gcd(275295799, 19).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10^4], !CoprimeQ[#, Numerator @ HarmonicNumber[#]] &] (* Amiram Eldar, Feb 24 2020 *)

Formula

a(n) is the n-th smallest element of the set M:= {m positive inter | gcd(A001008(m), m) > 1}, n >= 1.
Showing 1-10 of 467 results. Next