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.
%I A265381 #28 Feb 16 2025 08:33:27 %S A265381 1,3,7,14,29,59,119,238,477,955,1911,3822,7645,15291,30583,61166, %T A265381 122333,244667,489335,978670,1957341,3914683,7829367,15658734, %U A265381 31317469,62634939,125269879,250539758,501079517,1002159035,2004318071,4008636142,8017272285 %N A265381 Decimal representation of the middle column of the "Rule 158" elementary cellular automaton starting with a single ON (black) cell. %H A265381 Robert Price, <a href="/A265381/b265381.txt">Table of n, a(n) for n = 0..999</a> %H A265381 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/ElementaryCellularAutomaton.html">Elementary Cellular Automaton</a> %H A265381 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Rule158.html">Rule 158</a> %H A265381 Stephen Wolfram, <a href="http://wolframscience.com/">A New Kind of Science</a>, Wolfram Media, 2002; p. 55. %H A265381 <a href="/index/Ce#cell">Index entries for sequences related to cellular automata</a> %H A265381 <a href="https://oeis.org/wiki/Index_to_Elementary_Cellular_Automata">Index to Elementary Cellular Automata</a> %H A265381 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,0,1,-2). %F A265381 From _Colin Barker_, Dec 07 2015 and Apr 16 2019: (Start) %F A265381 a(n) = (-45+5*(-1)^n-(6-i*3)*(-i)^n-(6+3*i)*i^n+7*2^(4+n))/60 where i = sqrt(-1). %F A265381 a(n) = 2*a(n-1)+a(n-4)-2*a(n-5) for n>4. %F A265381 G.f.: (1+x+x^2) / ((1-x)*(1+x)*(1-2*x)*(1+x^2)). %F A265381 (End) %F A265381 a(n) = floor(7*2^(n+2)/15) for n>=0. - _Karl V. Keller, Jr._, Oct 01 2020 %e A265381 From _Michael De Vlieger_, Dec 09 2015: (Start) %e A265381 First 8 rows at left, ignoring "0" outside of range of 1's, the center column values in parentheses. The center column values up to that row are concatenated then converted into decimal at right: %e A265381 Rule 158 Binary Decimal %e A265381 (1) -> 1 = 1 %e A265381 1 (1) 1 -> 11 = 3 %e A265381 1 1 (1) 0 1 -> 111 = 7 %e A265381 1 1 1 (0) 0 1 1 -> 1110 = 14 %e A265381 1 1 1 0 (1) 1 1 0 1 -> 11101 = 29 %e A265381 1 1 1 0 0 (1) 1 0 0 1 1 -> 111011 = 59 %e A265381 1 1 1 0 1 1 (1) 0 1 1 1 0 1 -> 1110111 = 119 %e A265381 1 1 1 0 0 1 1 (0) 0 1 1 0 0 1 1 -> 11101110 = 238 %e A265381 1 1 1 0 1 1 1 0 (1) 1 1 0 1 1 1 0 1 -> 111011101 = 477 %e A265381 (End) %t A265381 f[n_] := Block[{w = {}}, Do[AppendTo[w, Boole[Mod[k, 4] != 3]], {k, 0, n}]; FromDigits[w, 2]]; Table[f@ n, {n, 0, 32}] (* _Michael De Vlieger_, Dec 09 2015 *) %o A265381 (Python) print([7*2**(n+2)//15 for n in range(34)]) # _Karl V. Keller, Jr._, Oct 01 2020 %Y A265381 Cf. A071037, A265380 (binary). %K A265381 nonn,easy %O A265381 0,2 %A A265381 _Robert Price_, Dec 07 2015