OFFSET
1,1
REFERENCES
Steven R. Finch, Mathematical Constants, Cambridge Univ. Press, 2003, Meissel-Mertens constants: Quadratic residues, pp. 96—98.
LINKS
Robert Baillie and Samuel S. Wagstaff, Lucas pseudoprimes, Mathematics of Computation 35 (1980), pp. 1391-1417.
FORMULA
1 + sum_{j=2..m} (p_j + 1)*2^(-j+1)*prod_{i=1..j-1} (1 - 1/p_i), where p_j is the j-th prime number.
EXAMPLE
3.147755148502400312516674955879769209272937748793398864...
MATHEMATICA
digits = 104; Clear[s]; s[m_] := s[m] = 1 + Sum[(Prime[j] + 1)*2^(-j + 1)* Product[1 - 1/Prime[i], {i, 1, j - 1}] // N[#, digits + 100]&, {j, 2, m}] ; s[10]; s[m = 20]; While[RealDigits[s[m]] != RealDigits[s[m/2]], Print[m]; m = 2*m]; RealDigits[s[m], 10, digits] // First
PROG
(PARI) do(lim)=my(p=2, pr=1., s=1); forprime(q=3, lim, pr*=(1-1/p)/2; s+=(q+1)*pr; p=q); s \\ Charles R Greathouse IV, Dec 20 2017
CROSSREFS
KEYWORD
nonn,cons
AUTHOR
Jean-François Alcover, Oct 24 2014
STATUS
approved