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

Kevin Ryde user42_kevin at yahoo.com.au
Wed Sep 28 10:07:48 CEST 2016


Андрей Заболотский <zabolotis at mail.ru> writes:
>
> http://pastebin.com/aCnECyj8 (it can be made much better)

Can usually choose between code or table for that sort of thing,
according to preference or the language.  Bit twiddling even, noticing
the rule would be from the low end look for a 1 bit, then the next bit
decides whether to flip 1 or 3 next bits, and repeat above there.

For connection to existing sequences, 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)).
Nice clean generating function in that sequence.



More information about the SeqFan mailing list