Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #15 Feb 23 2016 12:08:58
%S 1,0,0,1,0,0,1,1,0,0,0,1,1,0,1,1,0,0,0,1,0,0,1,0,1,0,0,1,1,0,1,2,0,0,
%T 0,1,0,0,1,0,0,0,0,0,1,0,0,1,1,0,0,1,0,0,1,1,1,0,0,2,1,0,2,2,0,0,0,1,
%U 0,0,1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,1,1,0,0,1,0,0,1,1,0,0,0,1,1,0,1,1,1,0,0,2,0,0,2,1,1
%N a(n) = number of distinct k for which A269174(k) = n; number of finite predecessors for pattern encoded in the binary expansion of n in Wolfram's Rule 124 cellular automaton.
%C At positions A000225 seems to occur the record values of this sequence: 1, 0, 1, 1, 1, 2, 2, 3, 4, 5, 7, 9, 12, 16, 21, 28, 37, 49, 65, 86, 114, 151, 200, 265, 351, 465, ... which seem to match with A000931 (Padovan sequence), or more exactly, with A182097 (Number of compositions (ordered partitions) into parts 2 and 3). Note that these values give also the number of predecessors for each "repunit-pattern" (2^n)-1 in Rule 110 cellular automaton, as rules 110 and 124 are mirror images of each other.
%H Antti Karttunen, <a href="/A269175/b269175.txt">Table of n, a(n) for n = 0..32768</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/ElementaryCellularAutomaton.html">Elementary Cellular Automaton</a>
%H S. Wolfram, <a href="http://wolframscience.com/">A New Kind of Science</a>
%H <a href="/index/Ce#cell">Index entries for sequences related to cellular automata</a>
%H <a href="https://oeis.org/wiki/Index_to_Elementary_Cellular_Automata">Index to Elementary Cellular Automata</a>
%o (Scheme)
%o (definec (A269175 n) (let loop ((p 0) (s 0)) (cond ((> p n) s) (else (loop (+ 1 p) (+ s (if (= n (A269174 p)) 1 0))))))) ;; Very straightforward and very slow.
%o ;; Somewhat optimized version:
%o (definec (A269175 n) (if (zero? n) 1 (let ((nwid-1 (- (A000523 n) 1))) (let loop ((p (if (< n 2) 0 (A000079 nwid-1))) (s 0)) (cond ((> (A000523 p) nwid-1) s) (else (loop (+ 1 p) (+ s (if (= n (A269174 p)) 1 0)))))))))
%Y Cf. A000225, A000931, A182097, A269174.
%Y Cf. A269176 (indices of zeros), A269177 (of nonzeros), A269178 (of ones).
%K nonn
%O 0,32
%A _Antti Karttunen_, Feb 22 2016