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!)
A334594 Irregular table read by rows: T(n,k) is the binary interpretation of the k-th row of the XOR-triangle with first row generated from the binary expansion of n. 1 <= k <= A070939(n). 7
1, 2, 1, 3, 0, 4, 2, 1, 5, 3, 0, 6, 1, 1, 7, 0, 0, 8, 4, 2, 1, 9, 5, 3, 0, 10, 7, 0, 0, 11, 6, 1, 1, 12, 2, 3, 0, 13, 3, 2, 1, 14, 1, 1, 1, 15, 0, 0, 0, 16, 8, 4, 2, 1, 17, 9, 5, 3, 0, 18, 11, 6, 1, 1, 19, 10, 7, 0, 0, 20, 14, 1, 1, 1, 21, 15, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
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.
The second column is A038554.
LINKS
Peter Kagey, Table of n, a(n) for n = 1..9217 (first 1023 rows)
MathOverflow user DSM, Number triangle
EXAMPLE
Table begins:
1;
2, 1;
3, 0;
4, 2, 1;
5, 3, 0;
6, 1, 1;
7, 0, 0;
8, 4, 2, 1;
9, 5, 3, 0;
10, 7, 0, 0;
11, 6, 1, 1;
For the 11th row, the binary expansion of 11 is 1011_2, and the corresponding XOR-triangle is
1 0 1 1
1 1 0
0 1
1
Reading the rows of this triangle in binary gives 11, 6, 1, 1.
MATHEMATICA
Array[Prepend[FromDigits[#, 2] & /@ #2, #1] & @@ {#, Rest@ NestWhileList[Map[BitXor @@ # &, Partition[#, 2, 1]] &, IntegerDigits[#, 2], Length@ # > 1 &]} &, 21] // Flatten (* Michael De Vlieger, May 08 2020 *)
PROG
(PARI) row(n) = {my(b=binary(n), v=vector(#b)); v[1] = n; for (n=1, #b-1, b = vector(#b-1, k, bitxor(b[k], b[k+1])); v[n+1] = fromdigits(b, 2); ); v; } \\ Michel Marcus, May 08 2020
CROSSREFS
Sequence in context: A278529 A160588 A081171 * A359336 A062778 A363620
KEYWORD
nonn,base,tabf,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 April 24 02:28 EDT 2024. Contains 371917 sequences. (Running on oeis4.)