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

A024451 a(n) is the numerator of Sum_{i = 1..n} 1/prime(i).

Original entry on oeis.org

0, 1, 5, 31, 247, 2927, 40361, 716167, 14117683, 334406399, 9920878441, 314016924901, 11819186711467, 492007393304957, 21460568175640361, 1021729465586766997, 54766551458687142251, 3263815694539731437539, 201015517717077830328949, 13585328068403621603022853
Offset: 0

Views

Author

Keywords

Comments

Arithmetic derivative of p#: a(n) = A003415(A002110(n)). - Reinhard Zumkeller, Feb 25 2002
(n-1)-st elementary symmetric functions of first n primes; see Mathematica section. - Clark Kimberling, Dec 29 2011
Denominators of the harmonic mean of the first n primes; A250130 gives the numerators. - Colin Barker, Nov 14 2014
Let Pn(n) = A002110 denote the primorial function. The average number of distinct prime factors <= prime(n) in the natural numbers up to Pn(n) is equal to Sum_{i = 1..n} 1/prime(i). - Jamie Morken, Sep 17 2018
Conjecture: All terms are squarefree numbers. - Nicolas Bělohoubek, Apr 13 2022
The above conjecture would imply that for n > 0, gcd(a(n), A369651(n)) = 1. See corollary 2 on the page 4 of Ufnarovski-Åhlander paper. - Antti Karttunen, Jan 31 2024
Apart from the initial 0, a subsequence of A048103. Proof: For all primes p, when i >= A000720(p), neither p itself nor p^p divides a(i) [implied by Henry Bottomley's Sep 27 2006 formula], but neither does p^p divide a(i) when 0 < i < A000720(p), as then p^p > a(i). See A074107, which gives an upper bound for this sequence. - Antti Karttunen, Nov 19 2024

Examples

			0/1, 1/2, 5/6, 31/30, 247/210, 2927/2310, 40361/30030, 716167/510510, 14117683/9699690, ...
		

References

  • S. R. Finch, Mathematical Constants, Cambridge, 2003, Sect. 2.2.
  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Sect. VII.28.

Crossrefs

Denominators are A002110.
Row sums of A077011 and A258566.
Subsequence of A048103 (after the initial 0).
Cf. A053144 (a lower bound), A074107 (an upper bound).
Cf. A109628 (indices k where a(k) is prime), A244622 (corresponding primes), A244621 (a(n) mod 12).
Cf. A369972 (k where prime(1+k)|a(k)), A369973 (corresponding primorials), A293457 (corresponding primes), A377992 (antiderivatives of the terms > 1 of this sequence).

Programs

  • Magma
    [ Numerator(&+[ NthPrime(k)^-1: k in [1..n]]): n in [1..18] ];  // Bruno Berselli, Apr 11 2011
    
  • Maple
    h:= n-> add(1/(ithprime(i)),i=1..n);
    t1:=[seq(h(n),n=0..50)];
    t1a:=map(numer,t1); # A024451
    t1b:=map(denom,t1); # A002110 - N. J. A. Sloane, Apr 25 2014
  • Mathematica
    a[n_] := Numerator @ Sum[1/Prime[i], {i, n}]; Array[a,18]  (* Jean-François Alcover, Apr 11 2011 *)
    f[k_] := Prime[k]; t[n_] := Table[f[k], {k, 1, n}]
    a[n_] := SymmetricPolynomial[n - 1, t[n]]
    Table[a[n], {n, 1, 16}] (* A024451 *)
    (* Clark Kimberling, Dec 29 2011 *)
    Numerator[Accumulate[1/Prime[Range[20]]]] (* Harvey P. Dale, Apr 11 2012 *)
  • PARI
    a(n) = numerator(sum(i=1, n, 1/prime(i))); \\ Michel Marcus, Sep 18 2018
    
  • Python
    from sympy import prime
    from fractions import Fraction
    def a(n): return sum(Fraction(1, prime(k)) for k in range(1, n+1)).numerator
    print([a(n) for n in range(20)]) # Michael S. Branicky, Feb 12 2021
    
  • Python
    from math import prod
    from sympy import prime
    def A024451(n):
        q = prod(plist:=tuple(prime(i) for i in range(1,n+1)))
        return sum(q//p for p in plist) # Chai Wah Wu, Nov 03 2022

Formula

Limit_{n->oo} (Sum_{p <= n} 1/p - log log n) = 0.2614972... = A077761.
a(n) = (Product_{i=1..n} prime(i))*(Sum_{i=1..n} 1/prime(i)). - Benoit Cloitre, Jan 30 2002
(n+1)-st elementary symmetric function of the first n primes.
a(n) = a(n-1)*A000040(n) + A002110(n-1). - Henry Bottomley, Sep 27 2006
From Antti Karttunen, Jan 31 2024, Feb 08 2024 and Nov 19 2024: (Start)
a(0) = 0, for n > 0, a(n) = 2*A203008(n-1) + A070826(n).
For n > 0, a(n) = A327860(A143293(n-1)).
For n > 0, a(n) = A348301(n) + A002110(n).
For n = 3..175, a(n) = A356253(A002110(n)). [See comments in A356253.]
For n >= 0, A053144(n) <= a(n) <= A074107(n) < A070826(1+n).
(End)

Extensions

a(0)=0 prepended by Alois P. Heinz, Jun 26 2015

A016088 a(n) = smallest prime p such that Sum_{primes q = 2, ..., p} 1/q exceeds n.

Original entry on oeis.org

2, 5, 277, 5195977, 1801241230056600523
Offset: 0

Views

Author

Keywords

Comments

The indices of these primes are in A046024: a(n) = A000040(A046024(n)).
Comment from Eric Bach, Jun 03 2005: Schoenfeld (Math. Comp. 1976) has explicit estimates that imply, assuming the Riemann hypothesis, that the sum first exceeds 4 for some x in the range (1.80124093... * 10^18, 1.80124152... * 10^18).
Eric Bach (Sep 14 2005) comments that the next element in the sequence is about 4.2 * 10^49, so it may remain unknown for all eternity.
Comment from Richard C. Schroeppel, Nov 09 2006: The Bach-Sorenson algorithm takes around x^(1/3) space and x^(2/3) time. When x = 4 * 10^49, these are roughly 10^16 and 10^33. We have facilities today that handle 10^16 storage. Current world computing capability is ~10^25 instructions/year (10^8.5 machines, 10^9.5 inst/sec, 10^7.5 sec/year). The algorithm seems very parallelizable. So with current resources, we could have the value for a(5) in a mere 10^8 years. This might seem like a long time, but it's far short of eternity.
The sequence is less than 2^3^n for all n >= 1. Moreover, the limit a of a_n^e^(-n) seems to exist and is approximately 2.16 and thus a^e^n is an estimate for the sequence which is not completely wrong. - Wolfgang Burmeister (Wolfgang-Burmeister(AT)t-online.de), May 05 2007
Sequence can be approximated by the simple expression a(n) = exp(exp(n-0.2615)) due to the behavior of the sum of reciprocals of primes. This gives: a(4)=1.801..*10^18; a(5)=4.2..*10^49 and a(6)=7.7..*10^134. - Carmine Suriano, Mar 25 2014

References

  • Calvin C. Clawson, Mathematical Mysteries, The Beauty and Magic of Numbers, Plenum Press, NY and London, 1996, page 64.

Crossrefs

Programs

  • Mathematica
    s = 0; k = 1; Do[ While[ s = N[ s + 1/Prime[ k ], 36 ]; s <= n, k++ ]; Print[ Prime[ k ] ]; k++, {n, 1, 3} ]
    s = 0; n = 0; For[k = 1, k > 0, k++, If[(s = N[s + 1/(p = Prime[k]), 40]) > n, Print[p|s]; n++ ]] (* Wolfgang Burmeister (Wolfgang-Burmeister(AT)t-online.de), May 05 2007 *)
  • PARI
    a(n)=my(t); forprime(p=2,, t+=1./p; if(t>n, return(p))) \\ Charles R Greathouse IV, Apr 29 2015

Formula

From Jonathan Sondow, Apr 17 2013: (Start)
a(n) = A000040(A000720(A223037(n))+1).
a(n) ~ prime(floor(e^e^n)) = A000040(A096232(n)) as n -> oo (see comment in A223037). (End)

Extensions

a(0) from Wolfgang Burmeister (Wolfgang-Burmeister(AT)t-online.de), May 05 2007
a(3) corrected by Ulrich Schimke (UlrSchimke(AT)aol.com)
a(4) computed by Eric Bach and Jon Sorenson, Sep 14 2005. They used a variant of the Lagarias-Miller-Odlyzko algorithm for pi(x) and found that sum_{p <= 1801241230056600467} 1/p = 3.99999999999999999966 and sum_{p <= 1801241230056600523} 1/p = 4.00000000000000000021. There are no primes between 1801241230056600467 and 1801241230056600523. Total computing time was about two weeks, divided between two workstations (i.e., about a week on each).

A046024 a(n) = smallest k such that Sum_{ i = 1..k } 1/prime(i) exceeds n.

Original entry on oeis.org

1, 3, 59, 361139, 43922730588128390
Offset: 0

Views

Author

Keywords

Comments

The corresponding primes prime(a(n)) are in A016088.
Index m for which the prime harmonic number p[ m ] := Sum[ 1/Prime[ k ],{k,1,m} ] >= n.

Crossrefs

Cf. A024451/A002110 for Sum_{i = 1..n} 1/prime(i).

Programs

  • Mathematica
    Table[m = 1; s = 0; While[(s = s + 1/Prime[m]) <= n, m++];
    m, {n, 0, 4}] (* Robert Price, Mar 27 2019 *)
  • PARI
    a(n)=my(t); forprime(p=2,, t+=1./p; if(t>n, return(primepi(p)))) \\ Charles R Greathouse IV, Apr 29 2015

Formula

From Jonathan Sondow, Apr 17 2013: (Start)
a(n) = A000720(A016088(n)) = A000720(A096232(n))+1.
a(n) = e^(e^(n + O(1))), see comment in A223037. [corrected by Charles R Greathouse IV, Aug 22 2013] (End)
a(n) = A103591(2*n). - Michel Marcus, Aug 22 2013

Extensions

a(4) found by Tomás Oliveira e Silva (tos(AT)det.ua.pt), using the fourth term of A016088. - Dec 14 2005
a(0) from Jonathan Sondow, Apr 16 2013
Showing 1-3 of 3 results.