OFFSET
1,1
COMMENTS
An XOR-triangle T(m) is an inverted 0-1 triangle formed by choosing as top row the binary rendition of n 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.
A334556 is the sequence of rotationally symmetrical T(m) (here abbreviated RST).
A central zero-triangle (CZT) is a field of contiguous 0-bits in T(m) surrounded on all sides by a layer of 1 bits, and generally k > 1 bits of any parity. Alternatively, these might be referred to as "central bubbles".
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Central zero-triangles in rotationally symmetrical XOR-Triangles, 2020.
Michael De Vlieger, Basic aspects of rotationally symmetrical XOR-triangles that have central zero triangles
Michael De Vlieger, Diagram montage of XOR-triangles for terms 1 <= n <= 1000.
Rémy Sigrist, C program for A334769K
EXAMPLE
For n = 151, we have rotationally symmetrical T(151) as below, replacing 0 with "." for clarity:
1 . . 1 . 1 1 1
1 . 1 1 1 . .
1 1 . . 1 .
. 1 . 1 1
1 1 1 .
. . 1
. 1
1
At the center of the figure we see a CZT with s = 2, ringed by 1s, with k = 2. Thus 151 is in the sequence.
For n = 11, we have rotationally symmetrical T(11):
1 . 1 1
1 1 .
. 1
1
Since there is no CZT, 11 is not in the sequence.
For n = 91, we have rotationally symmetrical T(91):
1 . 1 1 . 1 1
1 1 . 1 1 .
. 1 1 . 1
1 . 1 1
1 1 .
. 1
1
This XOR-triangle has many bubbles but none in the center, so 91 is not in the sequence.
MATHEMATICA
Block[{s, t = Array[NestWhileList[Map[BitXor @@ # &, Partition[#, 2, 1]] &, IntegerDigits[#, 2], Length@ # > 1 &] &, 2^18]}, s = Select[Range[Length@ t], Function[{n, h}, (Reverse /@ Transpose[MapIndexed[PadRight[#, h, -1] &, t[[n]] ]] /. -1 -> Nothing) == t[[n]]] @@ {#, IntegerLength[#, 2]} &]; Array[Block[{n = s[[#]]}, If[# == 0, Nothing, n] &@ FirstCase[MapIndexed[If[2 #2 > #3 + 1, Nothing, #1[[#2 ;; -#2]]] & @@ {#1, First[#2], Length@ #1} &, NestWhileList[Map[BitXor @@ # &, Partition[#, 2, 1]] &, IntegerDigits[n, 2], Length@ # > 1 &][[1 ;; Ceiling[IntegerLength[#, 2]/(2 Sqrt[3])] + 3]] ], r_List /; FreeQ[r, 1] :> Length@ r] /. k_ /; MissingQ@ k -> 0] &, Length@ s - 1, 2] ]
PROG
(C) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael De Vlieger, May 10 2020
EXTENSIONS
Data corrected by Rémy Sigrist, May 15 2020
STATUS
approved