[seqfan] Re: Project: sequences obtained from Gaussian Integers via Penney's binary method of encoding?

Андрей Заболотский zabolotis at mail.ru
Wed Oct 12 23:21:08 CEST 2016


Now here is the script for negation and addition of Gaussian integers written in base i-1 with bit twiddling and all that:
http://pastebin.com/uHJW13zf  
If anyone is interested in its developing, I can put it to Github.
It can easily be rewritten in C, but I still used Python to avoid messing with overflows.
I used the name "Khmelnik-Penney encoding" not only because Khmelnik's paper was published a bit earlier but also because he did a deep, general analysis of the codes of that kind and the related rules of arithmetics.

> looks like A060961 "compositions into 1,3,5" should be how many distinct sets of bit flips occur going between n and neg(n) both < 2^n. Ie. distinct bitxor(n,neg(n))
Yes, looks like it's true.



More information about the SeqFan mailing list