login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A334556 Numbers whose binary expansion generates rotationally symmetric XOR-triangles. 25

%I #58 Apr 06 2021 01:00:02

%S 0,1,11,13,39,57,83,91,101,109,151,233,543,599,659,731,805,877,937,

%T 993,1379,1483,1589,1693,2359,2391,2439,2535,3609,3705,3753,3785,4367,

%U 4591,4935,5031,5235,5267,5691,5851,6437,6597,7021,7053,7257,7353,7697,7921,8607

%N Numbers whose binary expansion generates rotationally symmetric XOR-triangles.

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

%C If n is in the sequence, then so is A030101(n), the binary reversal of n.

%C All positive terms are odd because each side must begin with (and therefore end with) a 1.

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

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

%C The second row in triangle has binary expansion given by A038554.

%C 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

%H Rémy Sigrist, <a href="/A334556/b334556.txt">Table of n, a(n) for n = 1..10000</a>

%H Michael De Vlieger, <a href="/A334556/a334556.png">Triangles illustrating the initial terms</a> [Keyword "look" refers to this link]

%H "DSM" MathOverflow user, <a href="https://mathoverflow.net/q/359138/104733">Number triangle</a>

%H Rémy Sigrist, <a href="/A334556/a334556.txt">C program for A334556</a>

%H Rémy Sigrist, <a href="/A334556/a334556.gp.txt">PARI program for A334556</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

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

%e 1 0 1 0 0 1 1

%e 1 1 1 0 1 0

%e 0 0 1 1 1

%e 0 1 0 0

%e 1 1 0

%e 0 1

%e 1

%t 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 *)

%o (C) See Links section.

%o (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

%o (PARI) See Links section.

%Y Cf. A003987, A030101, A038554, A070939.

%K base,nonn,nice,look

%O 1,3

%A _Peter Kagey_, May 06 2020

%E 0 prepended by _Rémy Sigrist_, May 07 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)