OFFSET
0,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..32767
Eric Weisstein's World of Mathematics, Elementary Cellular Automaton
S. Wolfram, A New Kind of Science
FORMULA
MATHEMATICA
a[n_] := BitAnd[BitOr[n, 2n], BitOr[BitXor[n, 2n], BitXor[n, 4n]]];
a /@ Range[0, 100] (* Jean-François Alcover, Feb 23 2020 *)
PROG
(Python) def a(n): return (n|2*n)&((n^(2*n))|(n^(4*n))) # Indranil Ghosh, Apr 19 2017
(Go)
package main
import "fmt"
func main() {
for n:=0; n<=100; n++{
fmt.Println((n|2*n)&((n^(2*n))|(n^(4*n))))}
} // Indranil Ghosh, Apr 19 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 22 2016
STATUS
approved