login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A269173 Formula for Wolfram's Rule 126 cellular automaton: a(n) = (n XOR 2n) OR (n XOR 4n). 2
0, 7, 14, 15, 28, 31, 30, 27, 56, 63, 62, 63, 60, 63, 54, 51, 112, 119, 126, 127, 124, 127, 126, 123, 120, 127, 126, 127, 108, 111, 102, 99, 224, 231, 238, 239, 252, 255, 254, 251, 248, 255, 254, 255, 252, 255, 246, 243, 240, 247, 254, 255, 252, 255, 254, 251, 216, 223, 222, 223, 204, 207, 198, 195, 448, 455, 462 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

Antti Karttunen, Table of n, a(n) for n = 0..8191

Eric Weisstein's World of Mathematics, Rule 126

S. Wolfram, A New Kind of Science

Index entries for sequences related to cellular automata

Index to Elementary Cellular Automata

FORMULA

a(n) = A048724(n) OR A048725(n) = (n XOR 2n) OR (n XOR 4n), where OR is a bitwise-or (A003986) and XOR is A003987.

Other identities. For all n >= 0:

a(2*n) = 2*a(n).

a(n) = A057889(a(A057889(n))). [Rule 126 is amphichiral (symmetric).]

EXAMPLE

a(4) = (4 XOR 2*4) OR (4 XOR 4*4) = 12 OR 20 = 28. - Indranil Ghosh, Apr 02 2017

MATHEMATICA

Table[BitOr[BitXor[n, 2n], BitXor[n, 4n]], {n, 0, 100}] (* Indranil Ghosh, Apr 02 2017 *)

PROG

(Scheme) (define (A269173 n) (A003986bi (A048724 n) (A048725 n)))

(PARI) for(n=0, 100, print1(bitor(bitxor(n, 2*n), bitxor(n, 4*n)), ", ")) \\ Indranil Ghosh, Apr 02 2017

(Python) print([(n^(2*n))|(n^(4*n)) for n in range(101)]) # Indranil Ghosh, Apr 02 2017

(C)

#include <stdio.h>

int main()

{

    int n;

    for(n=0; n<=100; n++){

        printf("%d, ", (n^(2*n))|(n^(4*n)));

    }

    return 0;

} /* Indranil Ghosh, Apr 02 2017 */

CROSSREFS

Cf. A003986, A003987, A048724, A048725, A057889.

Cf. A267365 (iterates starting from 1).

Cf. A269174.

Sequence in context: A173024 A115770 A086779 * A167197 A336797 A100599

Adjacent sequences:  A269170 A269171 A269172 * A269174 A269175 A269176

KEYWORD

nonn

AUTHOR

Antti Karttunen, Feb 22 2016

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 26 01:20 EDT 2021. Contains 346294 sequences. (Running on oeis4.)