half-baked generalized convolution sequence transforms. More pearls of wisdom. Comments to three sequences.

Antti Karttunen karttu at megabaud.fi
Wed Jun 13 19:34:39 CEST 2001



Marc LeBrun wrote:



> This transfrom somewhat counter-intuitively connects three sequences in a

> chain: from A006519 "Highest power of 2 dividing n." to A053644 "Largest

> power of 2 less than or equal to n" to A048678 "Binary expansion of
> nonnegative integers expanded to Zeckendorffian format with rewrite rules
> 0->0, 1->01." (jumping between the rightmost, leftmost and middlemost 1 bits).

Not at all. At least, if we take A053644, "Largest power of 2 less than or equal
to n; write n in binary and change all
but the first digit to zero.", and prepend it with zero:
0,1,2,3,4,5,6,7,8,9,10,11,...
0,1,2,2,4,4,4,4,8,8, 8,
8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,32,32,32,32,32,32,32,32,32,32,32,32,32,32,

and apply the MASK transform to it (do the mask convolution with all-1's sequence
A000012)
then for each Nth term of the resulting sequence, there exists
2^(number of 1-bits to the right of the most significant bit of N) maskees with
the
A053644[maskee] having the value 2^(position of the msb of N)

and 2^(number of 1-bits to the right of the second most significant bit of N)
maskees
with the A053644[maskee] having the value2^(position of the second most
significant bit of N),

etc.

An example clarifies:

suppose that N is 11, in binary: 1011
the most significant bit is at position 3 (zero-based), and there are
two 1-bits less significant than it. So 11 has 2^2 = 4 maskees:
1000, 1001, 1010, 1011 (in decimal 8,9,10 and 11), which all
has value 8 in A053644. So as a result of summing these four eights in
convolution, we multiply this bit 3 (8) by 4, i.e. shift it left by 2 bit
positions.

Then, for subsequence 11 of 1011, we have 2^1 = 2 maskees
10 and 11 (2 and 3), which both have value 2 in A053644,
thus we "multiply" this bit 1 (2) by 2, i.e. shift it left by 1 bit position.

And for the subsequence 1 of 1011 (the rightmost bit), we have just
one maskee 1, which has value 1 in A053644, i.e. it's not shifted at all.

So we see that each 1-bit is shifted as many bit-positions left as there
are 1-bits right to it. And that is exactly what follows if we apply the
definition of A048678 "Binary expansion of nonnegative integers
expanded to Zeckendorffian format with rewrite rules 0->0, 1->01."

So from 11 (in binary 1011) we get 37 (in binary 100101).

Regarding how the MASK transform of 0-prepended A055975
results A053644, that I leave to another time.

But I guess we could now add these comments:

%Y A055975 Inverse MASK transform of A053644. (conjectural)
%Y A053644 Mask transform of A055975 (prepended with 0), inverse MASK transform of
A048678.
(and let's make A053644 start from 0, so that this would hold:)
%O A053644 0,2
%S A053644 0,1,2,2,4,4,4,4,8

%Y A048768 Mask transform of A053644.




Terveisin taas,

Antti Karttunen







More information about the SeqFan mailing list