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.

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