|
|
A226124
|
|
Denominators of signed reciprocal primes with sums converging to 1.
|
|
1
|
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
The algorithm at A226049, with r = 1 and f(n) = 1/prime(n), gives the sum 1/2 + 1/3 + 1/5 - 1/29 + 1/863 - 1/107251 + 1/1519341947 - ... = 1, of which the denominators on the left side comprise this sequence.
|
|
LINKS
|
|
|
EXAMPLE
|
1/2 + 1/3 + 1/5 - 1/29 + 1/863 - 1/107251 + 1/1519341947 differs from 1 by less than 10^(-18).
|
|
MATHEMATICA
|
p[n_] := Prime[n]; q[x_] := PrimePi[x]; r = 1; u = 1/2 + 1/3 + 1/5; c[1] = q[1/(u - r)]; c[2] = q[1/(r - u + 1/p[c[1]])]; c[3] = q[1/(u - r - 1/p[c[1]] + 1/p[c[2]])]; c[4] = q[1/(r - u + 1/p[c[1]] - 1/p[c[2]] + 1/p[c[3]])]; Union[{2, 3, 5}, Table[p[c[i]], {i, 1, 4}]]
seq={2, 3, 5}; sum=Total@(1/seq); While[Length[seq]<10, p=NextPrime[Abs[1/(sum-1)], -1]; sum+=Sign[1-sum]/p; AppendTo[seq, p]]; seq (* Amiram Eldar, Mar 13 2019 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|