|
|
A333624
|
|
Irregular triangle read by rows: T(n,k) = number of triangles of zeros with side length k in the XOR-triangle with first row generated from the binary expansion of n.
|
|
4
|
|
|
0, 1, 1, 0, 1, 2, 2, 0, 1, 0, 0, 1, 1, 1, 2, 1, 3, 2, 1, 3, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 3, 1, 1, 2, 1, 2, 2, 0, 1, 5, 3, 1, 2, 0, 1, 1, 2, 3, 1, 5, 1, 2, 3, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 2, 1, 1, 3, 0, 1, 3, 2, 3, 2, 2, 1, 1, 0, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,6
|
|
COMMENTS
|
An XOR-triangle is an inverted 0-1 triangle formed by choosing a top row and having each entry in subsequent rows be the XOR of the two values above it, i.e., A038554(n) applied recursively until we reach a single bit.
Let b(n) = n written in binary and let L(n) = 1 + floor(log_2(n)) = A070939(n). Let => be a single iteration of XOR across pairs of bits in b(n). Let t(n) be the XOR triangle initiated by b(n). Thus we may refer to any bit in t(n) by the address S(i,j) with 1 <= i <= L(n) and 1 <= j <= L(n) - j + 1.
We detect triangles of zeros, which are "voids" amid surrounding 1's or undefined "space" in the t(n) via run lengths of -1 in S(i,j) - S(i-1,j) for i > 1, and for i = 1, run lengths of zeros.
We can compactify row n by taking the product of prime(k)^T(n,k) for 1 <= k <= A334591(n), decoding the compactified row using A067255. This way, we can compactify the populations of zero-triangles for large n. Example: for n = 151, t(151) has 3 singleton zeros and 4 zero-triangles of side length k = 2. Thus row 151 has {3, 4}. 2^3 * 3^4 = 8 * 81 = 648. A067255(648) = {3, 4}.
A333625(m) = Product(prime(k)^T(m,k)) for m in A334556 (rotationally symmetrical XOR-triangles).
A334896(m) = Product(prime(k)^T(m,k)) for m in A334769 (rotationally symmetrical XOR-triangles with central zero-triangles).
(End)
|
|
LINKS
|
Michael De Vlieger, Montage of XOR-triangle diagrams for 2 <= n <= 1025, with n in A334556 shown in black.
|
|
EXAMPLE
|
Table begins:
0;
1;
1;
0, 1;
2;
2;
0, 1;
0, 0, 1;
1, 1;
2, 1;
3;
2, 1;
3;
1, 1;
0, 0, 1;
0, 0, 0, 1;
1, 0, 1;
3, 1;
1, 2;
1, 2;
2, 0, 1;
...
Let b(n) = n written in binary. Let => be a single iteration of XOR across pairs of bits in b(n). Let t(n) be the XOR triangle initiated by b(n).
Row 1 contains {0}, since b(1) = 1. Since the XOR triangle that results from a single 1-bit merely consists of that bit and since there are no zeros in the triangle t(1), we write the single term zero in this row.
Row 5 = {2} since b(5) = 101 => 11 => 0. Here we have 2 lone zeros, thus {2}.
Row 12 = {2, 1} since b(12) = 1100 => 010 => 11 => 0. We have 2 isolated zeros and 1 triangle of zeros with side length 2, thus {2, 1}.
|
|
MATHEMATICA
|
Array[Function[w, If[Length@ # == 0, {0}, ReplacePart[ConstantArray[0, Max@ #[[All, 1]]], Map[#1 -> #2 & @@ # &, #]]] /. -Infinity -> 0 &@ Tally@ Flatten@ Array[If[# == 1, Map[If[First@ # == 1, Nothing, Length@ #] &, Split@ w[[#]] ], Map[If[First@ # == -1, Length@ #, Nothing] &, Split[w[[#]] - Most@ w[[# - 1]] ] ]] &, Length@ w]]@ NestWhileList[Map[BitXor @@ # &, Partition[#, 2, 1]] &, IntegerDigits[#, 2], Length@ # > 1 &] &, 39] // Flatten
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,tabf
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|