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 21-24 of 24 results.

A335019 Numbers whose prime exponents generates rotationally symmetric XOR-triangles.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 42, 64, 70, 128, 256, 390, 512, 1024, 1122, 1764, 2002, 2048, 2210, 4096, 4900, 6270, 7854, 8192, 9450, 15470, 15750, 16384, 26460, 32768, 36366, 54978, 58786, 65536, 66990, 73500, 74088, 86710, 108290, 123480, 131072, 152100, 162690
Offset: 1

Views

Author

Rémy Sigrist, May 19 2020

Keywords

Comments

For any positive number with prime factorization Product_{k = 1..m} prime(k)^e_k (where prime(k) denotes the k-th prime number and e_m > 0), we build a XOR-triangle with (e_m, ..., e_1) as top row, and having each entry in the subsequent rows be the XOR of the two values above it. This sequence lists integers whose XOR-triangle has 3-fold rotational symmetry. A334990 gives the second row of such XOR-triangles for numbers that are not powers of 2.
This sequence has strong connections with A334556: for any n > 0 and k > 0, A019565(A334556(n))^k belongs to this sequence.
Every power of 2 belongs to the sequence.
If m belongs to this sequence, then m^2 also belongs to this sequence.

Examples

			The number 15750 = 7^1 * 5^2 * 3^3 * 2^1 yields the following XOR-triangle:
     1 2 3 1
      3 1 2
       2 3
        1
As this XOR-triangle has rotational symmetry, 15750 belongs to this sequence.
		

Crossrefs

Programs

  • PARI
    is(n) = {
        my (e);
        if (n==1, e=[],
            my (f=factor(n), m=primepi(f[#f~,1]));
            e=vector(m, k, valuation(n, prime(m+1-k)))
        );
        my (x=e);
        for (k=1, #e,
            if (e[k]!=x[#x], return (0));
            if (x[1]!=e[#e+1-k], return (0));
            x=vector(#x-1, k, bitxor(x[k], x[k+1]));
        );
        return (1);
    }

Formula

A067029(a(n)) = A071178(a(n)).

A335061 Irregular table read by rows; n-th row corresponds to numbers in the range 0..2^n-1 whose binary expansion (possibly left-padded with 0's up to n binary digits) generates rotationally symmetric XOR-triangles.

Original entry on oeis.org

0, 1, 0, 0, 2, 0, 6, 11, 13, 0, 14, 0, 30, 39, 57, 0, 8, 54, 62, 83, 91, 101, 109, 0, 126, 151, 233, 0, 40, 92, 116, 138, 162, 214, 254, 0, 72, 140, 196, 314, 370, 438, 510, 543, 599, 659, 731, 805, 877, 937, 993, 0, 168, 854, 1022, 1379, 1483, 1589, 1693
Offset: 1

Views

Author

Rémy Sigrist, May 21 2020

Keywords

Comments

The n-th row has A060547(n) terms.
Every positive term of A334556, say m, appears in row A070939(m).

Examples

			The first rows are:
    0, 1
    0
    0, 2
    0, 6, 11, 13
    0, 14
    0, 30, 39, 57
    0, 8, 54, 62, 83, 91, 101, 109
The XOR-triangles corresponding to the 8 terms of row 7 are (with dots instead of 0's for clarity):
   T(7,1) = 0:        T(7,2) = 8:        T(7,3) = 54:       T(7,4) = 62,
   . . . . . . .      . . . 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
         .                  .                  .                  .
   T(7,5) = 83:       T(7,6) = 91:       T(7,7) = 101:      T(7,8) = 109:
   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 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

Cf. A060547 (row length), A070939, A334556.

Programs

  • Mathematica
    Table[Select[Range[0, 2^n - 1], Block[{k = #, w}, (Reverse /@ Transpose[#] /. -1 -> Nothing) == w &@ MapIndexed[PadRight[#, n, -1] &, Set[w, NestList[Map[BitXor @@ # &, Partition[#, 2, 1]] &, PadLeft[IntegerDigits[k, 2], n], n - 1]]]] &], {n, 12}] // Flatten (* Michael De Vlieger, May 24 2020 *)
  • PARI
    See Links section.

A335132 Numbers whose binary expansion generates 3-fold rotationally symmetric EQ-triangles.

Original entry on oeis.org

0, 1, 3, 5, 7, 9, 15, 17, 31, 33, 63, 65, 73, 119, 127, 129, 255, 257, 297, 349, 373, 395, 419, 471, 511, 513, 585, 653, 709, 827, 883, 951, 1023, 1025, 1193, 1879, 2047, 2049, 2145, 2225, 2257, 3887, 3919, 3999, 4095, 4097, 4321, 4681, 4777, 5501, 5533, 5941
Offset: 1

Views

Author

Rémy Sigrist, May 24 2020

Keywords

Comments

For any nonnegative number n, the EQ-triangle for n is built by taking as first row the binary expansion of n (without leading zeros), having each entry in the subsequent rows be the EQ of the two values above it (a "1" indicates that these two values are equal, a "0" indicates that these values are different).
The second row in such a triangle has binary expansion given by A279645.
If m belongs to this sequence, then A030101(m) also belongs to this sequence.
All positive terms are odd.
This sequence is a variant of A334556; here we use bitwise EQ, there bitwise XOR.

Examples

			For 349:
- the binary expansion of 349 is "101011101",
- the corresponding EQ-triangle is (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 1 1
          . . 1 1
           1 . 1
            . .
             1
- this triangle has 3-fold rotational symmetry, so 349 belongs to this sequence.
		

Crossrefs

Programs

  • PARI
    is(n) = {
        my (b=binary(n), p=b);
        for (k=1, #b,
            if (b[k]!=p[#p], return (0));
            if (p[1]!=b[#b+1-k], return (0));
            p = vector(#p-1, k, p[k]==p[k+1]);
        );
        return (1);
    }

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)
Previous Showing 21-24 of 24 results.