cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A356195 The binary expansion of a(n) is obtained by applying the totalistic cellular automaton with rule 2*n to the binary expansion of n.

This page as a plain text file.
%I A356195 #13 Jul 31 2022 19:54:25
%S A356195 0,1,0,3,0,6,3,7,0,14,3,14,0,9,7,15,0,30,3,30,0,25,7,30,0,16,12,29,7,
%T A356195 23,15,31,0,62,3,62,0,57,7,62,0,48,12,61,7,55,15,62,0,32,28,60,7,38,
%U A356195 28,61,0,33,19,51,15,47,31,63,0,126,3,126,0,121,7,126
%N A356195 The binary expansion of a(n) is obtained by applying the totalistic cellular automaton with rule 2*n to the binary expansion of n.
%C A356195 To compute the binary expansion of a(n):
%C A356195 - we scan the binary digits of n from right to left,
%C A356195 - at some position k >= 0 (0 corresponding to the least significant bit):
%C A356195      - we count the number of 1's at positions >= k, say we have w 1's,
%C A356195      - if 2^w appears in the binary expansion of 2*n,
%C A356195        then we insert a 1,
%C A356195        otherwise we insert a 0,
%C A356195      - as we are considering an even automaton (with rule 2*n),
%C A356195        once scanning the leading 0's of n, we will only insert 0's,
%C A356195      - and the result will have finitely many 1's.
%C A356195 More formally: 2^k appears in the binary expansion of a(n) iff 2^A000120(floor(n/2^k)) appears in the binary expansion of 2*n.
%H A356195 Rémy Sigrist, <a href="/A356195/b356195.txt">Table of n, a(n) for n = 0..8192</a>
%H A356195 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/TotalisticCellularAutomaton.html">Totalistic Cellular Automaton</a>
%H A356195 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%H A356195 <a href="/index/Ce#cell">Index entries for sequences related to cellular automata</a>
%F A356195 a(n) = n iff n belongs to A000225.
%F A356195 a(n) = 0 iff n AND A038573(n) = 0 (where AND denotes the bitwise AND operator).
%e A356195 For n = 43:
%e A356195 - the binary expansion of 2*43 is "1010110",
%e A356195 - so we apply the following totalistic cellular automaton:
%e A356195        w   | >=7  6   5   4   3   2   1   0
%e A356195        out |  0   1   0   1   0   1   1   0
%e A356195 - scanning the binary expansion of n, we obtains:
%e A356195     bin(n)    | 1   0   1   0   1   1
%e A356195     w         | 1   1   2   2   3   4
%e A356195     bin(a(n)) | 1   1   1   1   0   1
%e A356195 - so a(n) = 61.
%o A356195 (PARI) a(n) = { my (v=0, m=n); for (k=0, oo, if (m==0, return (v), bittest(2*n, hammingweight(m)), v+=2^k); m\=2) }
%Y A356195 Cf. A000120, A000225, A038573, A352528, A356215.
%K A356195 nonn,base
%O A356195 0,4
%A A356195 _Rémy Sigrist_, Jul 29 2022