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

A061002 As p runs through the primes >= 5, sequence gives { numerator of Sum_{k=1..p-1} 1/k } / p^2.

Original entry on oeis.org

1, 1, 61, 509, 8431, 39541, 36093, 375035183, 9682292227, 40030624861, 1236275063173, 6657281227331, 2690511212793403, 5006621632408586951, 73077117446662772669, 4062642402613316532391, 46571842059597941563297, 8437878094593961096374353
Offset: 3

Views

Author

N. J. A. Sloane, May 15 2001

Keywords

Comments

This is an integer by a theorem of Waring and Wolstenholme.
Conjecture: If p is the n-th prime and H(n) is the n-th harmonic number, then denominator(H(p)/H(p-1))/numerator(H(p-1)/p^2) = p^3. A193758(p)/a(n) = p^3, p > 3. - Gary Detlefs, Feb 20 2013
The sequence which gives the numerators of H_{p-1} = Sum_{k=1..p-1} 1/k for p prime >= 5 is A076637. - Bernard Schott, Dec 02 2018

References

  • Z. I. Borevich and I. R. Shafarevich, Number Theory. Academic Press, NY, 1966, p. 388 Problem 5.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, th. 115.

Crossrefs

Programs

  • GAP
    List(List(Filtered([5..80],p->IsPrime(p)),i->Sum([1..i-1],k->1/k)/i^2),NumeratorRat); # Muniru A Asiru, Dec 02 2018
    
  • Maple
    A061002:=proc(n) local p;
      p:=ithprime(n);
      (1/p^2)*numer(add(1/i,i=1..p-1));
    end proc;
    [seq(A061002(n),n=3..20)];
  • Mathematica
    Table[Function[p, Numerator[Sum[1/k, {k, p - 1}]/p^2]]@ Prime@ n, {n, 3, 20}] (* Michael De Vlieger, Feb 04 2017 *)
  • PARI
    a(n) = my(p=prime(n)); numerator(sum(k=1, p-1, 1/k))/p^2; \\ Michel Marcus, Dec 03 2018

Formula

a(n) = A001008(p-1)/p^2, p=A000040(n). - R. J. Mathar, Jan 09 2017
a(n) = A120285(n)/A001248(n). - R. J. Mathar, Jan 09 2017

A096617 Numerator of n*HarmonicNumber(n).

Original entry on oeis.org

1, 3, 11, 25, 137, 147, 363, 761, 7129, 7381, 83711, 86021, 1145993, 1171733, 1195757, 2436559, 42142223, 42822903, 275295799, 279175675, 56574159, 19093197, 444316699, 1347822955, 34052522467, 34395742267, 312536252003
Offset: 1

Views

Author

Eric W. Weisstein, Jul 01 2004

Keywords

Comments

a(1) = 1, a(n) = Numerator( H(n) / H(n-1) ), where H(n) = HarmonicNumber(n) = A001008(n)/A002805(n). - Alexander Adamchuk, Oct 29 2004
Sampling a population of n distinct elements with replacement, n HarmonicNumber(n) is the expectation of the sample size for the acquisition of all n distinct elements. - Franz Vrabec, Oct 30 2004
p^2 divides a(p-1) for prime p>3. - Alexander Adamchuk, Jul 16 2006
It appears that a(n) = b(n) defined by b(n+1) = b(n)*(n+1)/g(n) + f(n), f(n) = n*f(n-1)/g(n) and g(n) = gcd(b(n)*(n+1), n*f(n-1)), b(1) = f(1) = g(1) = 1, i.e., the recurrent formula of A000254(n) where both terms are divided by their GCD at each step (and remain divided by this factor in the sequel). Is this easy to prove? - M. F. Hasler, Jul 04 2019

Examples

			1, 3, 11/2, 25/3, 137/12, 147/10, 363/20, 761/35, 7129/280, ...
		

References

  • W. Feller, An Introduction to Probability Theory and Its Applications, Vol. I, 2nd Ed. 1957, p. 211, formula (3.3)

Crossrefs

Differs from A025529 at 7th term.
Cf. A193758.

Programs

  • Magma
    [Numerator(n*HarmonicNumber(n)): n in [1..40]]; // Vincenzo Librandi, Feb 19 2014
    
  • Maple
    ZL:=n->sum(sum(1/i, i=1..n), j=1..n): a:=n->floor(numer(ZL(n))): seq(a(n), n=1..27); # Zerinvary Lajos, Jun 14 2007
  • Mathematica
    Numerator[Table[(Sum[(1/k), {k, 1, n}]/Sum[(1/k), {k, 1, n-1}]), {n, 1, 20}]] (* Alexander Adamchuk, Oct 29 2004 *)
    Table[n*HarmonicNumber[n] // Numerator, {n, 1, 27}]  (* Jean-François Alcover, Feb 17 2014 *)
  • PARI
    {h(n) = sum(k=1,n,1/k)};
    for(n=1,50, print1(numerator(n*h(n)), ", ")) \\ G. C. Greubel, Sep 01 2018
    
  • PARI
    A=List(f=1); for(k=1,999, t=[A[k]*(k+1),f*=k]; t/=gcd(t); listput(A,t[1]+f=t[2])) \\ Illustrate conjectured equality. - M. F. Hasler, Jul 04 2019

Formula

a(n) = abs(Stirling1(n+1, 2))/(n-1)!. - Vladeta Jovovic, Jul 06 2004
a(n) = numerator of Integral_{t=0..oo} 1-(1-exp(-t/n))^n dt. - Jean-François Alcover, Feb 17 2014

A185399 As p runs through the primes, sequence gives denominator of Sum_{k=1..p-1} 1/k.

Original entry on oeis.org

1, 2, 12, 20, 2520, 27720, 720720, 4084080, 5173168, 80313433200, 2329089562800, 13127595717600, 485721041551200, 2844937529085600, 1345655451257488800, 3099044504245996706400, 54749786241679275146400, 3230237388259077233637600
Offset: 1

Views

Author

N. J. A. Sloane, Jan 21 2012

Keywords

References

  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 22-23.

Crossrefs

Cf. A001008, A002805 (numerators and denominators of harmonic numbers).

Programs

  • Magma
    [Denominator(HarmonicNumber(NthPrime(n)-1)): n in [1..40]]; // Vincenzo Librandi, Dec 05 2018
  • Maple
    f2:=proc(n) local p;
    p:=ithprime(n);
    denom(add(1/i,i=1..p-1));
    end proc;
    [seq(f2(n),n=1..20)];
  • Mathematica
    nn = 20; sm = 0; t = Table[sm = sm + 1/k; Denominator[sm], {k, Prime[nn]}]; Table[t[[p - 1]], {p, Prime[Range[nn]]}] (* T. D. Noe, Apr 23 2013 *)
  • PARI
    a(n) = denominator(sum(k=1, prime(n)-1, 1/k)); \\ Michel Marcus, Dec 05 2018
    

Formula

a(n) = denominator(sum((k+1)/(p-k-1), k=0..p-2)), where p = the n-th prime. - Gary Detlefs, Jan 12 2012
a(n) = numerator(H(p)/H(p-1)) - denominator(H(p)/H(p-1)), where p is the n-th prime and H(n) is the n-th harmonic number. - Gary Detlefs, Apr 21 2013

A368810 a(n) = numerator of Sum_{i=1..n} Sum_{j=1..n} (1/i + 1/j).

Original entry on oeis.org

2, 6, 11, 50, 137, 147, 363, 1522, 7129, 7381, 83711, 86021, 1145993, 1171733, 1195757, 4873118, 42142223, 42822903, 275295799, 279175675, 56574159, 19093197, 444316699, 1347822955, 34052522467, 34395742267, 312536252003, 315404588903, 9227046511387
Offset: 1

Views

Author

Mats Granvik, Jan 06 2024

Keywords

Crossrefs

Cf. A027611, A096620 (denominators), A193758.

Programs

  • Mathematica
    Numerator[Table[Sum[Sum[1/i + 1/j, {i, 1, n}], {j, 1, n}], {n, 1, 29}]]
  • Python
    from sympy import harmonic
    def A368810(n): return ((n<<1)*harmonic(n)).p # Chai Wah Wu, Feb 04 2024

A379561 a(n) = A003418(n+1)*H(n), where H(n) = 1 + 1/2 + ... + 1/n is the n-th harmonic number.

Original entry on oeis.org

2, 9, 22, 125, 137, 1029, 2178, 6849, 7129, 81191, 83711, 1118273, 1145993, 1171733, 2391514, 41421503, 42142223, 813635157, 825887397, 837527025, 848612385, 19761458895, 19994251455, 101086721625, 102157567401, 309561680403, 312536252003, 9146733078187
Offset: 1

Views

Author

Miko Labalan, Dec 26 2024

Keywords

Comments

abs(log(a(n)) - n - log(log(n))) < c*sqrt(n)*log(n)^(-1/2), where constant c = (2+A206431)*Pi/4. This also gives the upper bound of the squared error, (log(a(n)) - n - log(log(n)))^2 < (c^2)*n*log(n)^(-1).
A slightly better absolute error bound could be achieved by using the imaginary part of the nontrivial zeros of the Riemann zeta function, (zetazero(n)-1/2)/sqrt(-1) ~ (2*Pi)*n*LambertW(n/exp(1))^(-1). That bound would be, abs(log(a(n)) - n - log(log(n))) < sqrt(k)*sqrt(n)*LambertW(n/exp(1))^(-1/2), where constant k = 4*Pi/(1+2*A206431). This also gives the upper bound of the squared error, (log(a(n)) - n - log(log(n)))^2 < k*n*LambertW(n/exp(1))^(-1). The midline of the squared error would run along (4/(4+A206431))*n*LambertW(n/exp(1))^(-1).
Another slightly better absolute error bound but without relying on the properties of the zeta zeros would be, abs(log(a(n)) - n - log(log(n))) < n^(3/(9-10*A077761)).
log(a(n))-c*sqrt(n)*log(n)^(-1/2) is a lower bound of sigma_1(n) = A000203(n). Such that, n+log(log(n))-c*sqrt(n)*log(n)^(-1/2) < sigma_1(n) < H(n)+exp(H(n))*log(H(n)).
a(n) gives the total number of ordered pairs (k,m) where k in set {1,2,...,n}, m in set {1,2,...,A003418(n+1)}, and k divides m. Example: For n = 3, there are 22 ordered pairs (k,m) where k is {1,2,3} and m is a multiple of k up to 12. For k = 1, every m is a multiple of 1, m is {1,2,3,4,5,6,7,8,9,10,11,12} so there are 12 pairs. For k = 2, every m is a multiple of 2, m is {2,4,6,8,10,12} so there are 6 pairs. For k = 3, every m is a multiple of 3, m is {3,6,9,12} so there are 4 pairs. So the total ordered pairs is 12 + 6 + 4 = 22 = a(3). Each ordered pair (k,m) also represents an edge in a bipartite graph. Counting all such pairs gives the total number of edges in a graph.

Examples

			a(n)/A025558(n) = [ 2/1, 9/4, 22/9, 125/48, 137/50, 1029/360, 2178/735, ... ]
To evaluate the integral:
For n = 1: Integral_{x=0..1} Li_1(x^(1/2))/x^(1/2) dx = Integral_{x=0..1} -log(1-x^(1/2))/x^(1/2) dx = -2 * -(Sum_{x=1..oo} 1/(x*(x+1))) = -2 * -1 = 2.
For n = 2: Integral_{x=0..1} Li_1(x^(1/3))/x^(1/3) dx = Integral_{x=0..1} -log(1-x^(1/3))/x^(1/3) dx = -3 * -(Sum_{x=1..oo} 1/(x*(x+2))) = -3 * -((1/2)*(1+1/2)) = -3 * -3/4 = 9/4.
For n = 3: Integral_{x=0..1} Li_1(x^(1/4))/x^(1/4) dx = Integral_{x=0..1} -log(1-x^(1/4))/x^(1/4) dx = -4 * -(Sum_{x=1..oo} 1/(x*(x+3))) = -4 * -((1/3)*(1+1/2+1/3)) = -4 * -11/18 = 22/9.
		

Crossrefs

Cf. A001008/A002805 (harmonic numbers).
Cf. A003418 (lcm).
Cf. A025558 (denominator).
Cf. A193758 (very similar sequence).

Programs

  • PARI
    a(n) = lcm(vector(n+1, i, i))*sum(i=1, n, 1/i); \\ Michel Marcus, Dec 28 2024

Formula

a(n) = A025558(n)*(Integral_{x=0..1} Li_1(x^(1/(n+1)))/x^(1/(n+1)) dx).
a(n) = A025558(n) + A027457(n+1).
Integral_{x=0..1} Li_1(x^(1/(n+1)))/x^(1/(n+1)) dx = ((n+1)/n)*H(n) = a(n)/A025558(n).
((n+1)/n)*H(n) ~ log(n) + gamma + (log(n)+gamma+1/2)/n + O(1/n^2).
log(a(n)) ~ n + log(log(n)) + O(c*sqrt(n)*log(n)^(-1/2)), (See comments for constant c).
G.f. for ((n+1)/n)*H(n): G(x) = Li_2(x)+(1/2)*log(1-x)^2-log(1-x)/(1-x), the lim_{x->oo} G(x) = -zeta(2).
Hyperbolic l.g.f. for ((n+1)/n)*H(n): LH(x) = Li_2(x)+(1/2)*log(1-x)^2+Li_3(x)-Li_3(1-x)+Li_2(1-x)*log(1-x)+(1/2)*log(x)*log(1-x)^2+zeta(3), the Integral_{x=0..1} LH(x) dx = 2*zeta(3) = A152648.
Dirichlet g.f. for ((n+1)/n)*H(n): zeta(s+1)*(zeta(s)+zeta(s+2)).
Showing 1-5 of 5 results.