login
A269174
Formula for Wolfram's Rule 124 cellular automaton: a(n) = (n OR 2n) AND ((n XOR 2n) OR (n XOR 4n)).
13
0, 3, 6, 7, 12, 15, 14, 11, 24, 27, 30, 31, 28, 31, 22, 19, 48, 51, 54, 55, 60, 63, 62, 59, 56, 59, 62, 63, 44, 47, 38, 35, 96, 99, 102, 103, 108, 111, 110, 107, 120, 123, 126, 127, 124, 127, 118, 115, 112, 115, 118, 119, 124, 127, 126, 123, 88, 91, 94, 95, 76, 79, 70, 67, 192, 195, 198, 199, 204, 207, 206, 203, 216
OFFSET
0,2
FORMULA
a(n) = A163617(n) AND A269173(n).
a(n) = A163617(n) AND (A048724(n) OR A048725(n)).
a(n) = (n OR 2n) AND ((n XOR 2n) OR (n XOR 4n)).
Other identities. For all n >= 0:
a(2*n) = 2*a(n).
a(n) = A057889(A161903(A057889(n))). [Rule 124 is the mirror image of rule 110.]
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
(Scheme) (define (A269174 n) (A004198bi (A163617 n) (A003986bi (A048724 n) (A048725 n))))
(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
Cf. A269175.
Cf. A269176 (numbers not present in this sequence).
Cf. A269177 (same sequence sorted into ascending order, duplicates removed).
Cf. A269178 (numbers that occur only once).
Cf. A267357 (iterates from 1 onward).
Sequence in context: A226228 A365422 A335431 * A161903 A163617 A189634
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 22 2016
STATUS
approved