login
Largest prime p(k) > p(n) such that 1/p(n) + 1/p(n+1) + ... + 1/p(k) < 1, where p(n) is the n-th prime.
3

%I #14 Apr 20 2015 20:58:29

%S 3,23,107,337,853,1621,2971,4919,7757,11657,16103,22193,29251,37699,

%T 48523,61051,75479,91459,110563,131641,155501,183581,214177,248593,

%U 286063,325883,369979,419449,473647,534029,600623,667531,739523,816769,900997,988651,1083613

%N Largest prime p(k) > p(n) such that 1/p(n) + 1/p(n+1) + ... + 1/p(k) < 1, where p(n) is the n-th prime.

%C a(n+1) > n^e, by Rosser's theorem p(n) > n*log(n). (In fact, it appears that a(n) > (n*log(n))^e.)

%C So sum_{n>0} 1/a(n) = 1/3 + 1/23 + 1/107 + ... = 0.39....

%H Chai Wah Wu, <a href="/A225671/b225671.txt">Table of n, a(n) for n = 1..100</a>

%e a(1) = 3 because 1/2 + 1/3 < 1 < 1/2 + 1/3 + 1/5 (or because the slowest-growing sequence of primes whose reciprocals sum to 1 is A075442 = 2, 3, 7, ...).

%e a(2) = 23 because 1/3 + 1/5 + 1/7 + 1/11 + 1/13 + 1/17 + 1/19 + 1/23 < 1 < 1/3 + 1/5 + 1/7 + 1/11 + 1/13 + 1/17 + 1/19 + 1/23 + 1/29 (or because the slowest-growing sequence of odd primes whose reciprocals sum to 1 is A225669 = 3, 5, 7, 11, 13, 17, 19, 23, 967, ...).

%t L = {1}; n = 0; Do[ k = Last[L]; n++; While[ Sum[ 1/Prime[i], {i, n, k}] < 1, k++]; L = Append[L, k - 1], {22}]; Prime[ Rest[L]]

%o (Python)

%o from sympy import prime

%o def A225671(n):

%o ....xn, xd, k, p = 1, prime(n), n, prime(n)

%o ....while xn < xd:

%o ........k += 1

%o ........po, p = p, prime(k)

%o ........xn = xn*p + xd

%o ........xd *= p

%o ....return po # _Chai Wah Wu_, Apr 20 2015

%Y Cf. A075442, A225669.

%K nonn

%O 1,1

%A _Jonathan Sondow_, May 11 2013

%E a(23)-a(37) from _Chai Wah Wu_, Apr 20 2015