Elias delta to Fibonacci by tails (kinaba)

#!perl -p
${$a=s/0*.{@{+}}/$n=oct b.$&;1/e+s/.{$n}//;$a+=(@f=($a,@f))[1]until$a>($v=oct b.$&);print sort{1}1,map$v+0<=>($v%=$_),@f}while@f=/1/

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page