The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
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
Sequence in context: A232467 A131449 A289869 * A350684 A124443 A077172
KEYWORD
nonn,base,look
AUTHOR
Peter Kagey, May 07 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 20 11:05 EDT 2024. Contains 372712 sequences. (Running on oeis4.)