%I #43 Oct 19 2024 08:35:27
%S 4,11,24,45,69,103,143,194,254,315,390,467,553,651,759,872,990,1121,
%T 1258,1405,1566,1734,1912,2097,2285,2483,2696,2921,3161,3415,3659,
%U 3915,4178,4457,4736,5030,5332,5642,5964,6295,6633,6988,7343,7715,8099,8501,8900,9296,9704
%N Least k such that Sum_{m=1..k} 1/m > Product_{i=1..n} 1/(1 - 1/prime(i)).
%C This sequence compares partial sums of harmonic series with Euler's partial products.
%C Both Sum_{m=1..k} 1/m and Product_{i=1..n} 1/(1 - 1/prime(i)) are divergent.
%H Amiram Eldar, <a href="/A328684/b328684.txt">Table of n, a(n) for n = 1..1000</a>
%e a(2) = 11 because Sum_{m=1..10} 1/m = 7381/2520 = 2.92896... < Product_{i=1..2} 1/(1 - 1/prime(n)) = 3 < Sum_{m=1..11} 1/m = 83711/27720 = 3.01987...
%t s = 1; prec = 350; dd = {}; h = 1; hh = 1; k = 1; m = 1; Do[
%t k = k (1/(1 - Prime[n]^-s)); kk = N[k, prec];
%t While[kk > hh, h = h + 1/(m + 1)^s; hh = N[h, prec]; m++];
%t AppendTo[dd, m], {n, 1, 68}]; dd
%o (PARI) a(n) = my(k=1, pp = prod(i=1, n, 1/(1 - 1/prime(i))), s = 1); while (s <= pp, k++; s += 1/k); k; \\ _Michel Marcus_, Oct 29 2019
%o (PARI) apply( {A328684(n,p=1/prod(k=1,n,1-1/prime(k)))=for(k=1,oo, (0 > p -= 1/k) && return(k))}, [1..49]) \\ _M. F. Hasler_, Oct 31 2019
%o (PARI) lista(len) = {my(r = 1, s = 0, k = 0, c = 0); forprime(p = 2, , r /= (1-1/p); while(s <= r, k++; s += 1/k); c++; print1(k, ", "); if(c == len, break));} \\ _Amiram Eldar_, Oct 19 2024
%Y Cf. A328655.
%K nonn
%O 1,1
%A _Artur Jasinski_, Oct 25 2019