Talk:Calkin-Wilf sequence: Difference between revisions
Content added Content deleted
(→Off by one error?: It gets worse.) |
(i'th term?) |
||
Line 4: | Line 4: | ||
Other calculations fail as 0 is never a term if calculating the i'th term from the run length encodings of i for example. Best to correct the task wording and adjust all examples I think. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 23:37, 28 December 2020 (UTC) |
Other calculations fail as 0 is never a term if calculating the i'th term from the run length encodings of i for example. Best to correct the task wording and adjust all examples I think. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 23:37, 28 December 2020 (UTC) |
||
The 123456789'th term of 83116 / 51639 applies to the wikipedia series where the "first" term is 1. |
|||
I get, using the wikipedia calcs: |
|||
<pre>for i in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]: |
|||
print(i, ith_term(i)) |
|||
0 1 |
|||
1 1 |
|||
2 1/2 |
|||
3 2 |
|||
4 1/3 |
|||
5 3/2 |
|||
6 2/3 |
|||
7 3 |
|||
8 1/4 |
|||
9 4/3</pre> |
|||
zeroth, and first terms are both 1. Best to do as wikepedia does and have istart at 1 for the series I think? --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 00:07, 29 December 2020 (UTC) |