OFFSET
1,1
COMMENTS
Numbers m in this sequence A070939(m) (mod 3) = 0. All m have first and last bits = 1.
The numbers in this sequence can be constructed using run lengths of bits thus: 12..(42)..3 or the reverse 3..(24)..21, with at least one copy of the pair of parenthetic numbers.
Thus, the smallest number m has run lengths {1, 2, 4, 2, 3}, which is the binary 100111100111 = decimal 2535.
2n has the reverse run length pattern as 2n - 1. a(3) has the run lengths {1, 2, 4, 2, 4, 2, 3}, while a(4) has {3, 2, 4, 2, 4, 2, 1}, etc.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..1104
Michael De Vlieger, Diagram montage of XOR-triangles resulting from a(n) with 1 <= n <= 32.
Michael De Vlieger, Central zero-triangles in rotationally symmetrical XOR-Triangles, 2020.
Index entries for linear recurrences with constant coefficients, signature (0,65,0,-64).
FORMULA
From Colin Barker, Jun 09 2020: (Start)
G.f.: 3*x*(13 + 19*x)*(65 - 64*x^2) / ((1 - x)*(1 + x)*(1 - 8*x)*(1 + 8*x)).
a(n) = 65*a(n-2) - 64*a(n-4) for n>4.
a(n) = (1/21)*(-16 - 3*(-1)^n + 123*2^(5+3*n) - 85*(-1)^n*2^(5 + 3*n)) for n>0.
(End)
EXAMPLE
Diagrams of a(1)-a(4), replacing “0” with “.” and “1” with “@” for clarity:
a(1) = 2535 (a(2) = 3705 appears as a mirror image):
@ . . @ @ @ @ . . @ @ @
@ . @ . . . @ . @ . .
@ @ @ . . @ @ @ @ .
. . @ . @ . . . @
. @ @ @ @ . . @
@ . . . @ . @
@ . . @ @ @
@ . @ . .
@ @ @ .
. . @
. @
@
.
a(3) = 162279 (a(4) = 237177 appears as a mirror image):
@ . . @ @ @ @ . . @ @ @ @ . . @ @ @
@ . @ . . . @ . @ . . . @ . @ . .
@ @ @ . . @ @ @ @ . . @ @ @ @ .
. . @ . @ . . . @ . @ . . . @
. @ @ @ @ . . @ @ @ @ . . @
@ . . . @ . @ . . . @ . @
@ . . @ @ @ @ . . @ @ @
@ . @ . . . @ . @ . .
@ @ @ . . @ @ @ @ .
. . @ . @ . . . @
. @ @ @ @ . . @
@ . . . @ . @
@ . . @ @ @
@ . @ . .
@ @ @ .
. . @
. @
@
MATHEMATICA
Array[FromDigits[Flatten@ MapIndexed[ConstantArray[#2, #1] & @@ {#1, Mod[First[#2], 2]} &, If[EvenQ@ #1, Reverse@ #2, #2]], 2] & @@ {#, Join[{1, 2}, PadRight[{}, Ceiling[#, 2], {4, 2}], {3}]} &, 19]
(* Generate a textual plot of XOR-triangle T(n) *)
xortri[n_Integer] := TableForm@ MapIndexed[StringJoin[ConstantArray[" ", First@ #2 - 1], StringJoin @@ Riffle[Map[If[# == 0, "." (* 0 *), "@" (* 1 *)] &, #1], " "]] &, NestWhileList[Map[BitXor @@ # &, Partition[#, 2, 1]] &, IntegerDigits[n, 2], Length@ # > 1 &]]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael De Vlieger, May 16 2020
STATUS
approved