A352528 The binary expansion of a(n) is obtained by applying the elementary cellular automaton with rule (2*n) mod 256 to the binary expansion of n.
0, 1, 1, 2, 0, 4, 2, 6, 2, 11, 5, 12, 5, 12, 4, 12, 0, 17, 9, 26, 4, 21, 14, 30, 2, 19, 3, 18, 9, 25, 8, 24, 0, 33, 17, 50, 0, 36, 19, 54, 2, 35, 21, 52, 7, 38, 21, 52, 8, 41, 9, 42, 28, 61, 31, 62, 6, 39, 7, 38, 19, 51, 17, 48, 0, 65, 33, 98, 0, 68, 34, 103
Offset: 0
Examples
For n = 13: - we apply rule 26, - the binary expansion of 26 being "00011010", we apply the following evolutions: 111 110 101 100 011 010 001 000 0 0 0 1 1 0 1 0 - the binary expansion of 13 (with leading zeros) is "...0001101", - the binary digit of a(13) at place value 2^0 is 0 (from "101"), - the binary digit of a(13) at place value 2^1 is 0 (from "110"), - the binary digit of a(13) at place value 2^2 is 1 (from "011"), - the binary digit of a(13) at place value 2^3 is 1 (from "001"), - the other binary digits of a(13) are 0 (from "000"), - so the binary expansion of a(13) is "1100", - so a(13) = 12.
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..8192
- Rémy Sigrist, Scatterplot of the first 2^20 terms
- Eric Weisstein's World of Mathematics, Elementary Cellular Automaton
- Index entries for sequences related to binary expansion of n
- Index entries for sequences related to cellular automata
Programs
-
PARI
a(n) = { my (v=0, m=n); for (k=0, oo, if (m==0, return (v), bittest(2*n, m%8), v+=2^k); m\=2) }
Comments