in reply to Recamán's sequence and memory usage
1) remove consecutive entries between a(0)=0 and m-1 where m is the first missing value. This prevents the sieve from growing beyond resources to support it.
2) use an array instead of a hash -- if the index is numeric, it's an array.
3) calculate the rate of growth of the remaining sieve to test for convergence.
One world, one people
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Recamán's sequence and memory usage
by hdb (Monsignor) on Jul 15, 2015 at 11:25 UTC | |
by anonymized user 468275 (Curate) on Jul 15, 2015 at 11:57 UTC |