0
$\begingroup$

This is my code so far:

For[i=2, i<10, i++, Solve[x^i == x+1 && x >0]]

I would like to sum up all the x values that it outputs. How can I do so?

$\endgroup$
5
$\begingroup$

Quick answer

Total@Table[ x /. Solve[x^i == x + 1 && x > 0][[1]] , {i, 2, 9}]//N
(*9.76035*)
$\endgroup$
  • $\begingroup$ I ran the program by the way. It computes all the numbers positive numbers x s.t. x^n = x+1. Numbers like 1.618, 1.3247, 1.2207, etc. Its a sequence approaching 1 in the limit. Then I added all the decimal parts: .618 + .3247 + .2207 etc and found that it was divergent. Then I took the first 1000 sums and compared it to the first 10000 sums and I found a constant ratio of 1.596. Is there a concept for this? The ratio of divergent sums computed at logarithmic intervals. $\endgroup$ – Philip Yeranosian Dec 24 '19 at 2:43
  • 1
    $\begingroup$ +1, also: Sum[x /. Solve[x^i == x + 1 && x > 0][[1]], {i, 2, 9}] // N $\endgroup$ – WReach Dec 24 '19 at 6:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.