cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 11 results. Next

A334796 a(n) = (A070939(A334769(n)) - A334770(n))/3.

Original entry on oeis.org

2, 2, 3, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 3, 3, 2, 4, 4, 4, 4, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 5, 5, 5, 5, 3, 2, 4, 4, 4, 4, 2, 3, 5, 5, 5, 5, 5, 3, 5, 2, 5, 4, 5, 4, 4, 5, 4, 5, 2, 5, 3, 5, 6, 6, 6, 6, 3, 4, 5, 5, 4, 3, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 3, 4, 5
Offset: 1

Views

Author

Michael De Vlieger, May 12 2020

Keywords

Comments

An XOR-triangle T(m) is an inverted 0-1 triangle formed by choosing a 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(m) applied recursively until we reach a single bit.
A334556 is the sequence of rotationally symmetrical T(m).
A central zero-triangle (CZT) is a field of contiguous 0-bits, listed in A334769, a subset of A334556. CZTs have side length k = A334770(n), surrounded on all sides by a layer of 1 bits, and generally j > 1 bits of any parity.
This sequence describes the "frame width" j.
Smallest n with a given value of j appears in A334836. - Michael De Vlieger, May 20 2020

Examples

			a(4) pertains to T(599), with A334770(4) = 4.
(1 + A070939(599) - 4)/3 = (1 + 9 - 4)/3 = 6/3 = 2, thus a(4) = 2.
(Diagram, replacing 0 with “.”):
  1 . . 1 . 1 . 1 1 1
   1 . 1 1 1 1 1 . .
    1 1 . . . . 1 .
     . 1 . . . 1 1
      1 1 . . 1 .
       . 1 . 1 1
        1 1 1 .
         . . 1
          . 1
           1
a(11) pertains to T(2359), with A334770(11) = 3.
(1 + A070939(2359) - 4)/3 = (1 + 11 - 3)/3 = 9/3 = 3, thus a(11) = 3.
(Diagram):
  1 . . 1 . . 1 1 . 1 1 1
   1 . 1 1 . 1 . 1 1 . .
    1 1 . 1 1 1 1 . 1 .
     . 1 1 . . . 1 1 1
      1 . 1 . . 1 . .
       1 1 1 . 1 1 .
        . . 1 1 . 1
         . 1 . 1 1
          1 1 1 .
           . . 1
            . 1
             1
From _Michael De Vlieger_, May 14 2020: (Start)
Linear recurrences that produce XOR-triangles with frame length j (table may not be exhaustive):
j   LR          Lower               Upper
-----------------------------------------------------
2   (5, -4)     {39, 151}           {57, 223}
3   (17, -16)   {543, 8607}         {993, 15969}
                {1379, 22115}       {1589, 25397}
                {1483, 23755}       {1693, 27037}
                {2359, 37687}       {3785, 60617}
4   (17, -16)   {22243, 356067}     {25525, 408501}
                {39047, 624775}     {57625, 921881}
                {40679, 650983}     {59257, 948089}
                {171475, 2743763}   {208613, 3337957}
                {356067, 5697251}   {408501, 6536117}
... (End)
		

Crossrefs

Programs

  • Mathematica
    Block[{f, s = Rest[Import["https://oeis.org/A334556/b334556.txt", "Data"][[All, -1]] ]}, f[n_] := NestWhileList[Map[BitXor @@ # &, Partition[#, 2, 1]] &, IntegerDigits[n, 2], Length@ # > 1 &]; Array[Block[{n = s[[#]]}, If[# == 0, Nothing, (1 + Floor@ Log2[n] - #)/3] &@ FirstCase[MapIndexed[If[2 #2 > #3 + 1, Nothing, #1[[#2 ;; -#2]]] & @@ {#1, First[#2], Length@ #1} &, f[n][[1 ;; Ceiling[IntegerLength[#, 2]/(2 Sqrt[3])] + 3]] ],r_List /; FreeQ[r, 1] :> Length@ r] /. k_ /; MissingQ@ k -> 0] &, Length@ s - 1, 2] ]

A334836 a(n) = A334769(k) where k is the first position of n in A334796.

Original entry on oeis.org

151, 543, 10707, 33151, 345283, 2213663, 33629695, 134297599, 1109207903, 8657682303, 73283989519
Offset: 2

Views

Author

Michael De Vlieger, May 13 2020

Keywords

Comments

This sequence indexes the smallest number m = A334769(k) that, when expressed in binary b(k), generates a rotationally symmetrical XOR-triangle (RST) that features a central zero-triangle (CZT) with frame width n.
A "frame width" is the number of iterations j required to generate the first run of zeros in a CZT of an RST.
Let L = A070939(m) for m in A334769. For RSTs, j > 1, since a solid run of L 1s given a recursive XOR function applied to each pair of adjacent bits, would give rise to a solid run of (L - 1) zeros in the next iteration, and every iteration thereafter consists of zeros. Therefore m = (2(L - 1) - 1) is not rotationally symmetrical except when L = 1.
Sequence A334556 lists numbers m that produce RSTs; A334769 those RSTs that feature CZTs. Sequence A334796 renders the frame widths j for numbers in A334769.
For n = 7, A070939(a(n)) > 3(7) + 1 = 22, but is likely much larger, given a(6). a(7) is likely a number with more than 40 bits.

Examples

			a(2) = 151; Rotationally symmetrical XOR-triangle generated by 151, replacing 0s with "." for clarity, showing 2 bits to reach the central zero triangle of side length s = 2:
  1 . . 1 . 1 1 1
   1 . 1 1 1 . .
    1 1 . . 1 .
     . 1 . 1 1
      1 1 1 .
       . . 1
        . 1
         1
a(3) = 543; RST generated by 543, showing 3 bits to reach the CZT of side length s = 1 = A334770(3):
  1 . . . . 1 1 1 1 1
   1 . . . 1 . . . .
    1 . . 1 1 . . .
     1 . 1 . 1 . .
      1 1 1 1 1 .
       . . . . 1
        . . . 1
         . . 1
          . 1
           1
		

Crossrefs

A334896 Read terms e = T(n,k) in A333624 as Product(prime(k)^e) for n in A334769.

Original entry on oeis.org

648, 648, 686, 12096, 12096, 686, 192000, 139968, 192000, 139968, 1866240, 179712, 179712, 1866240, 814968, 2101248, 102036672, 331776000, 102036672, 331776000, 2101248, 814968, 179712000, 4423680000, 1866240000, 131010048, 179712000, 4423680000, 1866240000, 131010048
Offset: 1

Views

Author

Michael De Vlieger, May 23 2020

Keywords

Comments

Row a(n) of A067255 = row A334769(n) of A333624.
An XOR-triangle t(n) is an inverted 0-1 triangle formed by choosing a 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.
Let T(n,k) address the terms in the k-th position of row n in A333624.
This sequence encodes T(n,k) via A067255 to succinctly express the number of zero-triangles in A334769(n). To decode a(n) => A333624(A334769(n)), we use A067255(a(n)).

Examples

			a(1) = 648, since b(A334769(1)) = b(151) = 10010111, which generates T(151) as shown below, replacing 1 with "@" and 0 with ".":
  @ . . @ . @ @ @
   @ . @ @ @ . .
    @ @ . . @ .
     . @ . @ @
      @ @ @ .
       . . @
        . @
         @
In this figure we see 3 zero-triangles of side length k = 1, and 4 of side length k = 2, therefore, T(1,1) = 3 and T(1,2) = 4. This becomes 2^3 * 3^4 = 8 * 81 = 648.
Relationship of this sequence to A334556 and A333624:
        n  A334769(n)  a(n)  Row n of A333624
      --------------------------------------
       1    151       648    3, 4
       2    233       648    3, 4
       3    543       686    1, 0, 0, 3
       4    599     12096    6, 3, 0, 1
       5    937     12096    6, 3, 0, 1
       6    993       686    1, 0, 0, 3
       7   1379    192000    9, 1, 3
       8   1483    139968    6, 7
       9   1589    192000    9, 1, 3
      10   1693    139968    6, 7
      11   2359   1866240    9, 6, 1
      12   2391    179712    9, 3, 0, 0, 0, 1
      13   3753    179712    9, 3, 0, 0, 0, 1
      14   3785   1866240    9, 6, 1
      15   8607    814968    3, 3, 0, 3, 1
      16   9559   2101248   12, 3, 0, 0, 0, 0, 0, 1
      ...
		

Crossrefs

Programs

  • 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 ;; 29]]]]

A334770 Side length s of the central triangle of zeros in the XOR-triangle T(n).

Original entry on oeis.org

2, 2, 1, 4, 4, 1, 2, 2, 2, 2, 3, 6, 6, 3, 5, 8, 2, 2, 2, 2, 8, 5, 6, 3, 3, 6, 6, 3, 3, 6, 1, 1, 1, 1, 7, 10, 4, 4, 4, 4, 10, 7, 1, 1, 1, 1, 3, 9, 3, 12, 3, 6, 3, 6, 6, 3, 6, 3, 12, 3, 9, 3, 1, 1, 1, 1, 10, 7, 4, 4, 7, 10, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 10
Offset: 1

Views

Author

Michael De Vlieger, May 10 2020

Keywords

Comments

An XOR-triangle T(n) is an inverted 0-1 triangle formed by choosing a 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(n).
A central zero-triangle (CZT) is a field of contiguous 0-bits in T(n) 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".

Examples

			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. Since 151 is the first term of A334769, a(1) = 2.
For n = 599, we have a rotationally symmetrical T(599) with s = 4 and k = 2.
  1 . . 1 . 1 . 1 1 1
   1 . 1 1 1 1 1 . .
    1 1 . . . . 1 .
     . 1 . . . 1 1
      1 1 . . 1 .
       . 1 . 1 1
        1 1 1 .
         . . 1
          . 1
           1
Since A334769(4) = 599, a(4) = 4.
		

Crossrefs

Programs

  • Mathematica
    Block[{f, s = Rest[Import["https://oeis.org/A334556/b334556.txt", "Data"][[All, -1]] ]}, f[n_] := NestWhileList[Map[BitXor @@ # &, Partition[#, 2, 1]] &, IntegerDigits[n, 2], Length@ # > 1 &]; Array[Block[{n = s[[#]]}, If[# == 0, Nothing, #] &@ FirstCase[MapIndexed[If[2 #2 > #3 + 1, Nothing, #1[[#2 ;; -#2]]] & @@ {#1, First[#2], Length@ #1} &, f[n][[1 ;; Ceiling[IntegerLength[#, 2]/(2 Sqrt[3])] + 3]] ], r_List /; FreeQ[r, 1] :> Length@ r] /. k_ /; MissingQ@ k -> 0] &, Lengths - 1, 2] ]

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.

Original entry on oeis.org

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

Views

Author

Michael De Vlieger, May 08 2020

Keywords

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.
A334591(n) = length of row n.
From Michael De Vlieger, May 27 2020: (Start)
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)

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}.
		

Crossrefs

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

A334771 a(n) = smallest m that generates a rotationally symmetrical XOR-triangle T(m) with a central triangle of zeros with side length n.

Original entry on oeis.org

543, 151, 2359, 599, 8607, 2391, 37687, 9559, 137631, 38231, 602935, 152919, 2202015, 611671, 9646903, 2446679, 35232159, 9786711, 154350391, 39146839, 563714463, 156587351, 2469606199, 626349399, 9019431327, 2505397591, 39513699127, 10021590359
Offset: 1

Views

Author

Michael De Vlieger, May 10 2020

Keywords

Comments

An XOR-triangle T(m) is an inverted 0-1 triangle formed by choosing a 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(m) applied recursively until we reach a single bit.
A334556 is the sequence of rotationally symmetrical T(m).
A central zero-triangle (CZT) is a field of contiguous 0-bits with side length n 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".

Examples

			First 4 terms shown below, replacing 0 with “.” for clarity:
    a(1) = 543; T(543):
  1 . . . . 1 1 1 1 1
   1 . . . 1 . . . .
    1 . . 1 1 . . .
     1 . 1 . 1 . .
      1 1 1 1 1 .
       . . . . 1
        . . . 1
         . . 1
          . 1
           1
a(2) = 151; T(151):
  1 . . 1 . 1 1 1
   1 . 1 1 1 . .
    1 1 . . 1 .
     . 1 . 1 1
      1 1 1 .
       . . 1
        . 1
         1
a(3) = 2359; T(2359):
  1 . . 1 . . 1 1 . 1 1 1
   1 . 1 1 . 1 . 1 1 . .
    1 1 . 1 1 1 1 . 1 .
     . 1 1 . . . 1 1 1
      1 . 1 . . 1 . .
       1 1 1 . 1 1 .
        . . 1 1 . 1
         . 1 . 1 1
          1 1 1 .
           . . 1
            . 1
             1
a(4) = 599; T(599):
  1 . . 1 . 1 . 1 1 1
   1 . 1 1 1 1 1 . .
    1 1 . . . . 1 .
     . 1 . . . 1 1
      1 1 . . 1 .
       . 1 . 1 1
        1 1 1 .
         . . 1
          . 1
           1
		

Crossrefs

Programs

  • Mathematica
    Block[{f, s = Rest[Import["https://oeis.org/A334556/b334556.txt", "Data"][[All, -1]] ], t, u}, f[n_] := NestWhileList[Map[BitXor @@ # &, Partition[#, 2, 1]] &, IntegerDigits[n, 2], Length@ # > 1 &]; Set[{t, u}, Transpose@ Array[Block[{n = s[[#]]}, If[# == 0, Nothing, {n, #}] &@ FirstCase[MapIndexed[If[2 #2 > #3 + 1, Nothing, #1[[#2 ;; -#2]]] & @@ {#1, First[#2], Length@ #1} &, f[n][[1 ;; Ceiling[IntegerLength[#, 2]/(2 Sqrt[3])] + 3]]  ], r_List /; FreeQ[r, 1] :> Length@ r] /. k_ /; MissingQ@ k -> 0] &, Length@ s - 1, 2]]; Array[If[! IntegerQ@ #, 0, t[[#]] ] &@ FirstPosition[u, #][[1]] &, Max@ u] ]
    (* Second, more efficient program: *)
    LinearRecurrence[{0, 0, 0, 17, 0, 0, 0, -16}, {543, 151, 2359, 599, 8607, 2391, 37687, 9559}, 28] (* Michael De Vlieger, May 20 2020 *)
  • PARI
    Vec(x*(543 + 151*x + 2359*x^2 + 599*x^3 - 624*x^4 - 176*x^5 - 2416*x^6 - 624*x^7) / ((1 - x)*(1 + x)*(1 - 2*x)*(1 + 2*x)*(1 + x^2)*(1 + 4*x^2)) + O(x^30)) \\ Colin Barker, May 21 2020

Formula

a(n) = 17*a(n-4) - 16*a(n-8), starting with a(1) = 543, a(2) = 151, a(3) = 2359, a(4) = 599, a(5) = 8607, a(6) = 2391, a(7) = 37687, and a(8) = 9559.
G.f.: x*(543 + 151*x + 2359*x^2 + 599*x^3 - 624*x^4 - 176*x^5 - 2416*x^6 - 624*x^7) / ((1 - x)*(1 + x)*(1 - 2*x)*(1 + 2*x)*(1 + x^2)*(1 + 4*x^2)). - Colin Barker, May 21 2020

A334930 Numbers that generate rotationally symmetrical XOR-triangles featuring singleton zero bits in a hexagonal arrangement.

Original entry on oeis.org

1, 11, 13, 91, 109, 731, 877, 5851, 7021, 46811, 56173, 374491, 449389, 2995931, 3595117, 23967451, 28760941, 191739611, 230087533, 1533916891, 1840700269, 12271335131, 14725602157, 98170681051, 117804817261, 785365448411, 942438538093, 6282923587291, 7539508304749
Offset: 1

Views

Author

Michael De Vlieger, May 16 2020

Keywords

Comments

Subset of A334556.
No zero appears in the center of the figure, thus a(n) does not intersect A334769.
Numbers m with A070939(m) (mod 3) = 1 involving alternating run lengths of a singleton zero separated by a pair of 1s in the binary expansion, admitting an initial or final singleton 1.

Examples

			Diagrams of a(2)-a(5), replacing “0” with “.” and “1” with “@” for clarity:
     a(2)=11            a(3)=13
     @ . @ @            @ @ . @
      @ @ .              . @ @
       . @                @ .
        @                  @
.
    a(4) = 91          a(5) = 109
  @ . @ @ . @ @      @ @ . @ @ . @
   @ @ . @ @ .        . @ @ . @ @
    . @ @ . @          @ . @ @ .
     @ . @ @            @ @ . @
      @ @ .              . @ @
       . @                @ .
        @                  @
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1 + 11 x + 4 x^2 - 8 x^3)/(1 - 9 x^2 + 8 x^4), {x, 0, 28}], x]
    (* 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 &]]

Formula

G.f.: (1 + 11*x + 4*x^2 - 8*x^3)/(1 - 9*x^2 + 8*x^4).
a(n) = - (4/7) - (1/7)*(-1)^(n-1) + ((6 + 10*sqrt(2))/7)*(2*sqrt(2))^(n-1) + ((6 - 10*sqrt(2))/7)*(-2*sqrt(2))^(n-1) - Alejandro J. Becerra Jr., May 31 2020

A334931 Numbers that generate rotationally symmetrical XOR-triangles with a pattern of zero-triangles of edge length 2, some of which are clipped to result in some singleton zeros at the edges.

Original entry on oeis.org

151, 233, 1483, 1693, 10707, 13029, 644007, 941241, 317049751, 490370281, 3111314891, 3550957213, 22455577043, 27325461221, 1350581212071, 1973926386873, 664901519788951, 1028381017273577, 6524900247528907, 7446897021636253, 47092758308252115, 57305645652210405
Offset: 1

Views

Author

Michael De Vlieger, May 16 2020

Keywords

Comments

Subset of A334769 which is a subset of A334556.
Numbers m in this sequence A070939(m) (mod 3) = 2. The numbers in this sequence can be constructed using run lengths of bits.
2n has the reverse run length pattern as 2n - 1. a(1) has the run lengths {1, 2, 1, 1, 3}, while a(2) has {3, 1, 1, 2, 1}, etc.
For n = 1 (mod 8): 12..(1132)..113;
For n = 3 (mod 8): 113..(2113)..2112;
For n = 5 (mod 8): 11123..(1123)..1122;
For n = 7 (mod 8): 123112..(3112)..31123, where the parenthetic run lengths occur, when they occur, in multiples of 3. Thus, a(9) has the run length form 12113211321132113 = binary 10010111001011100101110010111 = decimal 317049751.

Examples

			Diagrams of a(1)-a(6), replacing "0" with "." and "1" with "@" for clarity:
a(1) = 151 (a(2) = 233 appears as a mirror image):
  @ . . @ . @ @ @
   @ . @ @ @ . .
    @ @ . . @ .
     . @ . @ @
      @ @ @ .
       . . @
        . @
         @
.
a(3) = 1483 (a(4) = 1693 appears as a mirror image):
  @ . @ @ @ . . @ . @ @
   @ @ . . @ . @ @ @ .
    . @ . @ @ @ . . @
     @ @ @ . . @ . @
      . . @ . @ @ @
       . @ @ @ . .
        @ . . @ .
         @ . @ @
          @ @ .
           . @
            @
.
a(5) = 10707 (a(6) = 13029 appears as a mirror image):
  @ . @ . . @ @ @ . @ . . @ @
   @ @ @ . @ . . @ @ @ . @ .
    . . @ @ @ . @ . . @ @ @
     . @ . . @ @ @ . @ . .
      @ @ . @ . . @ @ @ .
       . @ @ @ . @ . . @
        @ . . @ @ @ . @
         @ . @ . . @ @
          @ @ @ . @ .
           . . @ @ @
            . @ . .
             @ @ .
              . @
               @
		

Crossrefs

Programs

  • Mathematica
    Array[FromDigits[Flatten@ MapIndexed[ConstantArray[#2, #1] & @@ {#1, Mod[First[#2], 2]} &, If[EvenQ@ #1, Reverse@ #2, #2]], 2] & @@ {#1, Which[#2 == 1, PadRight[{1, 2}, 12 Ceiling[#1/8] - 7, {3, 2, 1, 1}], #2 == 2, PadRight[{1, 1}, 12 Ceiling[#1/8] - 6, {1, 1, 3, 2}]~Join~{2}, #2 == 3, PadRight[{1, 1}, 12 Ceiling[#1/8] - 4, {3, 1, 1, 2}]~Join~{2}, True, PadRight[{}, 12 Ceiling[#1/8] - 1, {1, 2, 3, 1}]]} & @@ {#, Ceiling[Mod[#, 8]/2]} &, 22]
    (* 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 &]]
    (* From G.f.: *)
    Rest@ CoefficientList[Series[x (1654784 x^13 + 1359872 x^12 + 477184 x^11 + 1236992 x^10 + 1733632 x^9 + 379648 x^8 + 941241 x^7 + 644007 x^6 + 13029 x^5 + 10707 x^4 + 1693 x^3 + 1483 x^2 + 233 x + 151)/((1 - x^8) (1 - 2097152 x^8)), {x, 0, 22}], x] (* Michael De Vlieger, Mar 19 2021 *)

Formula

From Alejandro J. Becerra Jr., Mar 01 2021: (Start)
G.f.: x*(1654784*x^13 + 1359872*x^12 + 477184*x^11 + 1236992*x^10 + 1733632*x^9 + 379648*x^8 + 941241*x^7 + 644007*x^6 + 13029*x^5 + 10707*x^4 + 1693*x^3 + 1483*x^2 + 233*x + 151)/((1 - x^8)*(1 - 2097152*x^8)).
a(n) = 2097153*a(n-8) - 2097152*a(n-16). (End)

A334932 Numbers that generate rotationally symmetrical XOR-triangles with a pattern of zero-triangles of edge length 3, some of which are clipped to result in some zero-triangles of edge length 2 at the edges.

Original entry on oeis.org

2535, 3705, 162279, 237177, 10385895, 15179385, 664697319, 971480697, 42540628455, 62174764665, 2722600221159, 3979184938617, 174246414154215, 254667836071545, 11151770505869799, 16298741508578937, 713713312375667175, 1043119456549052025, 45677651992042699239
Offset: 1

Views

Author

Michael De Vlieger, May 16 2020

Keywords

Comments

Subset of A334769 which is a subset of A334556.
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.

Examples

			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):
  @ . . @ @ @ @ . . @ @ @ @ . . @ @ @
   @ . @ . . . @ . @ . . . @ . @ . .
    @ @ @ . . @ @ @ @ . . @ @ @ @ .
     . . @ . @ . . . @ . @ . . . @
      . @ @ @ @ . . @ @ @ @ . . @
       @ . . . @ . @ . . . @ . @
        @ . . @ @ @ @ . . @ @ @
         @ . @ . . . @ . @ . .
          @ @ @ . . @ @ @ @ .
           . . @ . @ . . . @
            . @ @ @ @ . . @
             @ . . . @ . @
              @ . . @ @ @
               @ . @ . .
                @ @ @ .
                 . . @
                  . @
                   @
		

Crossrefs

Programs

  • 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 &]]

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)

A334915 Numbers whose XOR-triangles have central zeros.

Original entry on oeis.org

0, 8, 9, 14, 15, 16, 17, 30, 31, 32, 33, 62, 63, 64, 65, 66, 67, 72, 73, 74, 75, 84, 85, 86, 87, 92, 93, 94, 95, 96, 97, 98, 99, 104, 105, 106, 107, 116, 117, 118, 119, 124, 125, 126, 127, 128, 129, 130, 131, 148, 149, 150, 151, 168, 169, 170, 171, 188, 189
Offset: 1

Views

Author

Rémy Sigrist, May 16 2020

Keywords

Comments

Depending on the binary length of n, the center of the XOR-triangle for n consists of a single cell or a 2 X 2 X 2 triangle pointing upwards or downwards.

Examples

			The XOR-triangles for a(8) = 30 and a(18) = 72 are as follows:
.   1   1   1   1   0         1   0   0   1   0   0   0
.       ---------
.     0 \ 0   0 / 1             1   0   1   1   0   0
.        \     /                         / \
.       0 \ 0 / 1                 1   1 / 0 \ 1   0
.          \ /                          -----
.         0   1                     0   1   1   1
.
.           1                         1   0   0
.
.                                       1   0
.
.                                         1
		

Crossrefs

Cf. A334769.

Programs

  • PARI
    is(n) = {
        my (h=#binary(n)-1, l=0, m);
        while (abs(h-l)>1, n=bitxor(m=n, n\2); h-=2; l++);
        if (h>l, bittest(n,h)==0 && bittest(n,l)==0,
            h
    				
Showing 1-10 of 11 results. Next