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.
LINKS
Peter Kagey, Table of n, a(n) for n = 1..8191 (values less than 2^13)
MathOverflow user DSM, Number triangle
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
AUTHOR
Peter Kagey, May 07 2020
STATUS
approved