OFFSET
1,2
COMMENTS
An XOR-triangle T(m) is an inverted 0-1 triangle formed by choosing a top row the binary rendition b(m) of m 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. We may plot T(m) as an equilateral triangle, since each iteration decrements the binary integer length L of the output until we have L = 1.
The XOR function used here requires two inputs; if the inputs agree, the output is 0, else 1.
A rotationally-symmetrical XOR-triangle (RST) is one whose appearance is the same when rotated 120 degrees.
A zero triangle of side length k arises when we have a run of (k + 1) 1s in the preceding iteration.
This sequence contains m that produce T(m) with a recordsetting side length of its largest zero-triangle. For 1 < n < 3, T(a(n)) only has eccentric zero triangles. T(a(4)) has a singleton zero at center, thus a central zero triangle (CZT) of k = 1. For n > 4, all T(a(n)) have CZTs.
The number 543 = A281482(4); we observe that A281482(2^i) produces RSTs, and only for 0 <= i <= 2 do we have eccentric zero triangles larger than any possible CZT. For A281482(2^3) = 131583, the side length of its eccentric zero triangles prove much smaller than the largest possible CZT.
Since this sequence wants to maximize the side length k of the largest triangle, we see that the largest triangle possible is the CZT. Let j be the "frame width" or number of iterations required to generate the first run of 0s in the CZT. We note j >= 2, since j = 1 requires a run of (k + 1) ones delimited by at least 1 zero; such a width implies that these zeros occur at the beginning and end of b(m). However, beginning binary notation with a leading zero is not permitted. Therefore, if it is possible, we will see T(m) with j > 1.
The numbers that produce record-setting m are the smaller of the binary reverse of m, therefore binary weight favors the least significant digits. Thus we see a 1 followed by a number of zeros in a "prefix" A that, along with a suffix C, must have the same number of bits.
For RSTs with a CZT, we have only one way to produce a solid run of (k + 1) zeros, that is, by dithering bits, which necessitates paired 0 and 1, therefore, we have even k for n > 4.
A run-length formula for a(n) with n > 4 is 12..i(11)..3, meaning that we have 1 one, 2 zeros, any number i of paired 1-0 bits, and a run of 3 ones. Aside from the reversal of this pattern, which puts a greater binary weight in the most significant 3 bits, there is no other way to construct a smaller (or any) CZT with frame size j = 2.
This equates to linear recurrence kernel (5, -4) starting with {2391, 9559} (though 39 is part of the same trajectory).
LINKS
FORMULA
a(1) = 1; for 2 <= n <= 4, a(n) = A281482(2^(n - 2)); a(5) = 2391, a(6) = 9559, for n > 6, a(n) = 5*a(n-1) - 4*a(n-2).
From Alejandro J. Becerra Jr., Jun 01 2020 : (Start)
For n > 4, a(n) = (5/3) + (7/3)*4^n.
G.f.: (4 - 9*x)/(4*x^2 - 5*x + 1) - 56*x^4 - 112*x^3 - 28*x^2 - 10*x - 4. (End)
EXAMPLE
XOR-triangles T(a(n)) for 2 <= n <= 5, with "." = 0, "@" = 1:
a(4) = 543
a(3) = 39 @ . . . . @ @ @ @ @
a(2) = 11 @ . . . @ . . . .
@ . . @ @ @ @ . . @ @ . . .
@ . @ @ @ . @ . . @ . @ . @ . .
@ @ . @ @ @ . @ @ @ @ @ .
. @ . . @ . . . . @
@ . @ . . . @
@ . . @
. @
a(5) = 2391 @
@ . . @ . @ . @ . @ @ @
@ . @ @ @ @ @ @ @ . .
@ @ . . . . . . @ .
. @ . . . . . @ @
@ @ . . . . @ .
. @ . . . @ @
@ @ . . @ .
. @ . @ @
@ @ @ .
. . @
. @
@
.
a(6) = 9559
@ . . @ . @ . @ . @ . @ @ @
@ . @ @ @ @ @ @ @ @ @ . .
@ @ . . . . . . . . @ .
. @ . . . . . . . @ @
@ @ . . . . . . @ .
. @ . . . . . @ @
@ @ . . . . @ .
. @ . . . @ @
@ @ . . @ .
. @ . @ @
@ @ @ .
. . @
. @
@
MATHEMATICA
With[{s = Rest[Import["https://oeis.org/A334769/b334769.txt", "Data"][[All, -1]] ]}, Map[With[{w = NestWhileList[Map[BitXor @@ # &, Partition[#, 2, 1]] &, IntegerDigits[#, 2], Length@ # > 1 &]}, If[Length@ # == 0, 1, Times @@ Flatten@ MapIndexed[Prime[#2]^#1 &, #] &@ ReplacePart[ConstantArray[0, Max@ #[[All, 1]]], Map[#1 -> #2 & @@ # &, #]]] &@ 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]] /. -Infinity -> 0 &, s[[1 ;; 30]] ] ]
(* or *)
Join[{1}, Array[2^(# + 1)*(2^# + 1) - 1 &, 4, 1], LinearRecurrence[{5, -4}, {2391, 9559}, 21]]
(* or *)
Rest@ CoefficientList[Series[(12 - 27 x)/(12 x^2 - 15 x + 3) - 56 x^4 - 112 x^3 - 28 x^2 - 10 x - 4, {x, 0, 25}], x] (* Michael De Vlieger, Jun 01 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael De Vlieger, May 24 2020
STATUS
approved