Data update
This commit is contained in:
parent
5af6d93694
commit
796d366b97
455 changed files with 7413 additions and 1900 deletions
|
|
@ -26,6 +26,8 @@ The fraction '''9/4''' has odd continued fraction representation &
|
|||
;Task part 2:
|
||||
* Find the position of the number <big>'''<sup>83116</sup>'''<big>'''/'''</big>'''<sub>51639</sub>'''</big> in the Calkin-Wilf sequence.
|
||||
|
||||
;Related tasks:
|
||||
:* [[Fusc sequence]].
|
||||
|
||||
;See also:
|
||||
* Wikipedia entry: [[wp:Calkin%E2%80%93Wilf_tree|Calkin-Wilf tree]]
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ cf_bin(fracti):=block(
|
|||
cf_list:cf(fracti),
|
||||
cf_len:length(cf_list),
|
||||
if oddp(cf_len) then cf_list:reverse(cf_list) else cf_list:reverse(append(at(cf_list,[cf_list[cf_len]=cf_list[cf_len]-1]),[1])),
|
||||
makelist(lambda([x],if oddp(x) then makelist(1,j,1,cf_list[x]) else makelist(0,j,1,cf_list[x]))(i),i,1,length(cf_list)),
|
||||
makelist(lambda([x],if oddp(x) then makelist(1,j,1,cf_list[x]) else makelist(0,j,1,cf_list[x]))(i),i,1,length(cf_list)), /* decoding part begins here */
|
||||
apply(append,%%),
|
||||
apply("+",makelist(2^i,i,0,length(%%)-1)*reverse(%%)))$
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue