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.

A334556 Numbers whose binary expansion generates rotationally symmetric XOR-triangles.

Original entry on oeis.org

0, 1, 11, 13, 39, 57, 83, 91, 101, 109, 151, 233, 543, 599, 659, 731, 805, 877, 937, 993, 1379, 1483, 1589, 1693, 2359, 2391, 2439, 2535, 3609, 3705, 3753, 3785, 4367, 4591, 4935, 5031, 5235, 5267, 5691, 5851, 6437, 6597, 7021, 7053, 7257, 7353, 7697, 7921, 8607
Offset: 1

Views

Author

Peter Kagey, May 06 2020

Keywords

Comments

An XOR-triangle is an inverted 0-1 triangle formed by choosing a top row and having each entry in the subsequent rows be the XOR of the two values above it.
If n is in the sequence, then so is A030101(n), the binary reversal of n.
All positive terms are odd because each side must begin with (and therefore end with) a 1.
The number of terms with a given binary length (A070939) is either 0 or a power of 2. This is because the "all sides are equal" property is equivalent to being the solution to a system of linear equations over the field of integers modulo 2.
If x, y, and z are in the sequence and have the same binary length, then x XOR y XOR z is also in the sequence, where XOR is the nim sum (A003987).
The second row in triangle has binary expansion given by A038554.
The resemblance to 1D CA stems from that it's the same rule as "Rule 90", aka "Pascal's triangle reduced modulo 2" aka Sierpinski Gasket. - Antti Karttunen May 06 2020

Examples

			The sequence contains 83 = 1010011_2. Reading clockwise, all sides of the corresponding XOR triangle are 1010011.
  1 0 1 0 0 1 1
   1 1 1 0 1 0
    0 0 1 1 1
     0 1 0 0
      1 1 0
       0 1
        1
		

Crossrefs

Programs

  • C
    See Links section.
    
  • Mathematica
    Select[Range[10^4], Block[{n = #, m, w}, m = IntegerLength[n, 2]; (Reverse /@ Transpose[#] /. -1 -> Nothing) == w &@ MapIndexed[PadRight[#, m, -1] &, Set[w, NestList[Map[BitXor @@ # &, Partition[#, 2, 1]] &, IntegerDigits[n, 2], m - 1]]]] &] (* Michael De Vlieger, May 06 2020 *)
  • PARI
    is(n) = { my (m=#binary(n)-1, x=n); for (k=0, m, if (bittest(n, m-k)!=bittest(x, 0) || bittest(x, m-k)!=bittest(n, k), return (0)); x=bitxor(x, x\2)); return (1) } \\ Rémy Sigrist, May 07 2020
    
  • PARI
    See Links section.

Extensions

0 prepended by Rémy Sigrist, May 07 2020