The newest version of http://void.wikidot.com/code:hofseq-c adds a small const array for values below 256, which is several times faster(because these values get recalculated at each call to hofseq_ff):
~/Code>time ./hofseq-old 2000000000
2000083969706219361
real 0m20.092s
user 0m20.050s
sys 0m0.008s
~/Code>time ./hofseq 2000000000
2000083969706219361
real 0m6.980s
user 0m6.978s
sys 0m0.000s