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-5 of 5 results.

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

A334769 Numbers m that generate rotationally symmetrical XOR-triangles T(m) that have central triangles of zeros.

Original entry on oeis.org

151, 233, 543, 599, 937, 993, 1379, 1483, 1589, 1693, 2359, 2391, 3753, 3785, 8607, 9559, 10707, 11547, 13029, 13869, 15017, 15969, 22115, 22243, 23627, 23755, 25397, 25525, 26909, 27037, 33151, 34591, 35535, 36015, 37687, 38231, 39047, 40679, 57625, 59257
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 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".

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

Crossrefs

Programs

  • C
    See Links section.
  • 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] ]

Extensions

Data corrected by Rémy Sigrist, May 15 2020

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

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

A335077 a(n) sets a record for side length k of zero-triangle in a rotationally symmetrical XOR-triangle.

Original entry on oeis.org

1, 11, 39, 543, 2391, 9559, 38231, 152919, 611671, 2446679, 9786711, 39146839, 156587351, 626349399, 2505397591, 10021590359, 40086361431, 160345445719, 641381782871, 2565527131479, 10262108525911, 41048434103639, 164193736414551, 656774945658199, 2627099782632791
Offset: 1

Views

Author

Michael De Vlieger, May 24 2020

Keywords

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

Examples

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

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 ;; 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 *)

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)
Showing 1-5 of 5 results.