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.
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
Offset: 1
Examples
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}.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10086 (rows 1 <= n <= 2500, flattened.)
- Michael De Vlieger, Montage of XOR-triangle diagrams for 2 <= n <= 1025, with n in A334556 shown in black.
- Michael De Vlieger, Table of rows 1 <= n <= 10000, with terms k space-delimited, rows newline delimited.
- Michael De Vlieger, Central zero-triangles in rotationally symmetrical XOR-Triangles, 2020.
- Index entries for sequences related to binary expansion of n
- Index entries for sequences related to XOR-triangles
Programs
-
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
Comments