Skip to main content
formatting
Source Link
YCor
  • 63.9k
  • 5
  • 187
  • 285

Approximating e$e$ with 2s and 3s

How can I generate a series of 2s and 3s such that the average of the generated values (so far) is as close to e$e$ as possible?

For example:

3:       avg=3      |2-e|    =0.282
3,2:     avg=2.5    |2.5-e|  =0.218
3,2,3:   avg=2.667  |2.667-e|=0.052
3,2,3,3: avg=2.75   |2.75-e| =0.032

Also, how can I quickly check if the nth$n$th index in the sequence is a 2 or 3?

Approximating e with 2s and 3s

How can I generate a series of 2s and 3s such that the average of the generated values (so far) is as close to e as possible?

For example:

3:       avg=3      |2-e|    =0.282
3,2:     avg=2.5    |2.5-e|  =0.218
3,2,3:   avg=2.667  |2.667-e|=0.052
3,2,3,3: avg=2.75   |2.75-e| =0.032

Also, how can I quickly check if the nth index in the sequence is a 2 or 3?

Approximating $e$ with 2s and 3s

How can I generate a series of 2s and 3s such that the average of the generated values (so far) is as close to $e$ as possible?

For example:

3:       avg=3      |2-e|    =0.282
3,2:     avg=2.5    |2.5-e|  =0.218
3,2,3:   avg=2.667  |2.667-e|=0.052
3,2,3,3: avg=2.75   |2.75-e| =0.032

Also, how can I quickly check if the $n$th index in the sequence is a 2 or 3?

edited tags
Link
YCor
  • 63.9k
  • 5
  • 187
  • 285
edited body
Source Link
lshamis
  • 161
  • 4

How can I generate a series of 2s and 3s such that the average of the generated values (so far) is as close to e as possible?

For example:

23:       avg=2avg=3      |2-e|    =0.718282
2,3,2:     avg=2.5    |2.5-e|  =0.218
2,3,2,3:   avg=2.667  |2.667-e|=0.052
2,3,2,3,3: avg=2.75   |2.75-e| =0.032

Also, how can I quickly check if the nth index in the sequence is a 2 or 3?

How can I generate a series of 2s and 3s such that the average of the generated values (so far) is as close to e as possible?

For example:

2:       avg=2      |2-e|    =0.718
2,3:     avg=2.5    |2.5-e|  =0.218
2,3,3:   avg=2.667  |2.667-e|=0.052
2,3,3,3: avg=2.75   |2.75-e| =0.032

Also, how can I quickly check if the nth index in the sequence is a 2 or 3?

How can I generate a series of 2s and 3s such that the average of the generated values (so far) is as close to e as possible?

For example:

3:       avg=3      |2-e|    =0.282
3,2:     avg=2.5    |2.5-e|  =0.218
3,2,3:   avg=2.667  |2.667-e|=0.052
3,2,3,3: avg=2.75   |2.75-e| =0.032

Also, how can I quickly check if the nth index in the sequence is a 2 or 3?

Source Link
lshamis
  • 161
  • 4
Loading