OFFSET
1,1
COMMENTS
Euler proved that for every s > 1, Sum_{m>=1} 1/m^s = Product_{n>=1} 1/(1 - 1/prime(n)^s) = zeta(s).
This sequence compares partial sums with partial products for the case s = 2.
For the case s = 1 and partial sums of harmonic series and Euler’s partial products see A328684.
LINKS
Robert Israel, Table of n, a(n) for n = 1..3000
Leonhard Euler, Variae observationes circa series infinitas, (Various Observations about Infinite Series), published by St Petersburg Academy, 1737.
EXAMPLE
a(2)=7 because Product_{n=1..2} 1/(1 - 1/prime(n)^2) < Sum_{m=1..7} 1/m^2, since 3/2 = 1.5 < 266681/176400 = 1.5118...
MAPLE
N:= 100: # for a(1)..a(N)
p:= 1: P:= 1:
for n from 1 to N do
p:= nextprime(p);
P:= P * 1/(1-1/p^2);
PP[n]:= P;
od:
k:= 1: S:= 0: notdone:= true:
for n from 1 while notdone do
S:= S + 1/n^2;
while S > PP[k] do
A[k]:= n;
k:= k+1;
if k > N then notdone:= false; break fi
od
od:
seq(A[i], i=1..N); # Robert Israel, Dec 10 2019
MATHEMATICA
dd = {}; h = 1; hh = 1; k = 1; m = 1; Do[k = k (1/(1 - Prime[n]^-2));
kk = N[k, 30];
While[kk > hh, h = h + 1/(m + 1)^2; hh = N[h, 30]; m++];
AppendTo[dd, m], {n, 1, 68}]; dd
PROG
(PARI) a(n) = my(k=1, pp = prod(i=1, n, 1/(1 - 1/prime(i)^2)), s = 1); while (s <= pp, k++; s += 1/k^2); k; \\ Michel Marcus, Oct 29 2019
(PARI) apply( {A328655(n, s=2, p=1/prod(k=1, n, 1-prime(k)^-s))=for(k=1, oo, (p-=k^-s)<0&&return(k))}, [1..60]) \\ optional 2nd arg allows to compute analog for other powers s (float avoids exact calculation using fractions, use with care). - M. F. Hasler, Oct 31 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Artur Jasinski, Oct 24 2019
STATUS
approved