A334595 Binary interpretation of the right diagonal of the XOR-triangle with first row generated from the binary expansion of n.
1, 1, 2, 1, 6, 3, 4, 1, 14, 4, 11, 2, 13, 7, 8, 1, 30, 11, 20, 7, 24, 13, 18, 3, 28, 9, 22, 5, 26, 15, 16, 1, 62, 20, 43, 13, 50, 24, 39, 5, 58, 16, 47, 9, 54, 28, 35, 2, 61, 23, 40, 14, 49, 27, 36, 6, 57, 19, 44, 10, 53, 31, 32, 1, 126, 43, 84, 24, 103, 50
Offset: 1
Examples
For n = 19, the binary expansion of 19 is 10011_2, and the XOR-triangle with first row generated from the binary expansion of 19 is: 1 0 0 1 1 1 0 1 0 1 1 1 0 0 0 Reading the right side of the triangle starting from the upper-right corner gives 10100 which is the binary representation of 20 = a(19).
Links
- Peter Kagey, Table of n, a(n) for n = 1..8191 (values less than 2^13)
- MathOverflow user DSM, Number triangle
- Index entries for sequences related to binary expansion of n
Programs
-
PARI
a(n) = {my(b=binary(n), v=vector(#b)); v[#b] = b[#b]; for (n=1, #b-1, b = vector(#b-1, k, bitxor(b[k], b[k+1])); v[#b] = b[#b];); fromdigits(Vecrev(v), 2);} \\ Michel Marcus, May 08 2020
Comments