A334556 Numbers whose binary expansion generates rotationally symmetric XOR-triangles.
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
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
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
- Michael De Vlieger, Triangles illustrating the initial terms [Keyword "look" refers to this link]
- "DSM" MathOverflow user, Number triangle
- Rémy Sigrist, C program for A334556
- Rémy Sigrist, PARI program for A334556
- Index entries for sequences related to binary expansion of n
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
Comments