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.

Previous Showing 11-20 of 24 results. Next

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

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

A361818 For any number k >= 0, let T_k be the triangle whose base corresponds to the ternary expansion of k (without leading zeros) and other values, say t above u and v, satisfy t = (-u-v) mod 3; this sequence lists the numbers k such that T_k has 3-fold rotational symmetry.

Original entry on oeis.org

0, 1, 2, 4, 8, 13, 26, 34, 40, 46, 59, 65, 80, 112, 121, 130, 224, 233, 242, 304, 364, 424, 518, 578, 728, 772, 862, 925, 1003, 1093, 1183, 1261, 1324, 1414, 1535, 1598, 1688, 1766, 1856, 1919, 2006, 2096, 2186, 2257, 2509, 2734, 3028, 3280, 3532, 3826, 4051
Offset: 1

Views

Author

Rémy Sigrist, Mar 25 2023

Keywords

Comments

We can devise a similar sequence for any fixed base b >= 2; the present sequence corresponds to b = 3, and A334556 corresponds to b = 2.
This sequence is infinite as it contains A048328.
If k belongs to the sequence, then A004488(k) and A030102(k) belong to the sequence.
Empirically, there are 2*3^floor((w-1)/3) positive terms with w ternary digits.
For any k, if t appears above u and v in T_k, then t + u + v = 0 (mod 3) and #{t, u, v} = 1 or 3 (the three values are either equal or all distinct); each value is uniquely determined by the two others in the same way: t = (-u-v) mod 3, u = (-t-v) mod 3, v = (-t-u) mod 3; this means that we can reconstruct T_k from any of its three sides.
If some row of T_k, say r, has w values and corresponds to the ternary expansion of m, then the row above r corresponds to the w-1 rightmost digits of the ternary expansion of A060587(m).
All positive terms belong to A297250 (their most significant digit equals their least significant digit in base 3).

Examples

			The ternary expansion of 304 is "102021", and the corresponding triangle is:
             1
            0 2
           2 1 0
          0 1 1 2
         2 1 1 1 0
        1 0 2 0 2 1
As this triangle has 3-fold rotational symmetry, 304 belongs to the sequence.
		

Crossrefs

Programs

  • PARI
    See Links section.

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)

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

A371636 For any number k >= 0, let T_k be the triangle with values in {-1, 0, +1} whose base corresponds to the balanced ternary expansion of k (without leading zeros) and other values, say t above u and v, satisfy t+u+v = 0 mod 3; this sequence lists the numbers k such that T_k has 3-fold rotational symmetry.

Original entry on oeis.org

0, 1, 4, 13, 19, 25, 40, 103, 112, 121, 154, 214, 364, 442, 505, 595, 673, 763, 826, 913, 1003, 1093, 1144, 1369, 1621, 1915, 2167, 2392, 2776, 3028, 3280, 3628, 4420, 4996, 5668, 6244, 7036, 8203, 9022, 9841, 10459, 10594, 11782, 12304, 13411, 13627, 14419
Offset: 1

Views

Author

Rémy Sigrist, Mar 30 2024

Keywords

Comments

This sequence is a variant of A334556 and A361818.
This sequence is infinite as it contains A003462.
Empirically, for any w > 0, there are A127975(w-1) terms with w balanced ternary digits (ignoring leading zeros).
If k is a term then A338246(k) is also a term.

Examples

			The balanced ternary expansion of 595 is "1T11001" (where T denotes -1), and the corresponding triangle T_595 is as follows:
           1
          T 0
         1 0 0
        1 1 T 1
       0 T 0 1 1
      0 0 1 T 0 T
     1 T 1 1 0 0 1
As this triangle has 3-fold rotational symmetry, 595 belongs to the sequence.
		

Crossrefs

Programs

  • PARI
    \\ See Links section.

A334918 Numbers whose XOR-triangles have reflection symmetry.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 14, 15, 16, 17, 21, 22, 24, 27, 30, 31, 32, 33, 40, 45, 51, 54, 62, 63, 64, 65, 72, 73, 85, 86, 93, 94, 96, 99, 104, 107, 118, 119, 126, 127, 128, 129, 153, 158, 165, 168, 182, 189, 195, 200, 214, 219, 224, 231, 254, 255, 256, 257
Offset: 1

Views

Author

Rémy Sigrist, May 16 2020

Keywords

Comments

There are three possible axes of symmetry:
.
. V
. U W
. .___._____.
. \ . . /
. \ . /
. . .
. . \ . / .
. W \ / U
. .
.
. V
.
- symmetry through axis U-U is only possible for the numbers 0 and 1,
- symmetry through axis V-V corresponds to binary palindromes,
- symmetry through axis W-W corresponds to number k such that A334727(k) is a binary palindrome,
- 0 and 1 are the only terms whose XOR-triangles have the three symmetries,
- XOR-triangles of other terms have only one kind of symmetry.

Examples

			The XOR-triangles for a(15) = 21 and a(16) = 22 are as follows (with dots instead of 0's for clarity):
                      1 . 1 . 1      1 . 1 1 .
                       1 1 1 1        1 1 . 1
                        . . .          . 1 1
                         . .            1 .
                          .              1
		

Crossrefs

Cf. A006995, A334556 (rotational symmetry), A334727.

Programs

  • PARI
    is(n) = { my (b=binary(n)); if (b==Vecrev(b), return (1), my (w=#b-1, x=n); for (k=0, w, if (bittest(n,k)!=bittest(x,0), return (0)); x=bitxor(x,x\2)); return (1)) }
Previous Showing 11-20 of 24 results. Next