login
A334595
Binary interpretation of the right diagonal of the XOR-triangle with first row generated from the binary expansion of n.
7
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,3
COMMENTS
An XOR-triangle is an inverted 0-1 triangle formed by choosing a top row and having each entry in the subsequent rows be the XOR of the two values above it.
a(n) = n if and only if n is in A334556.
Conjecture: Records occur at 1 and at 2^n + 1.
Conjecture: a(n) = 1 if and only if n is a power of two.
EXAMPLE
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).
PROG
(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
CROSSREFS
KEYWORD
nonn,base,look
AUTHOR
Peter Kagey, May 07 2020
STATUS
approved