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 A094604 #34 Apr 19 2025 17:51:28 %S A094604 1,3,4,6,7,9,15,16,24,25,27,29,34,36,37,39,41,43,48,49,51,54,55,58,60, %T A094604 63,64,66,69,70,72,74,77,79,80,82,84,86,90,91,93,100,103,104,106,108, %U A094604 111 %N A094604 Largest number (up to that point) of consecutive rightmost black cells in the rows of Rule 30 (begun from an initial black cell). a(n) = b(2^n), where b(m) is sequence A094603. %C A094604 The natural number n appears a(n)-a(n-1) times in A094606. %C A094604 The number of contiguous black or ON cells, rightmost or otherwise, includes the terms {10, 11}. Row 42 contains 10 contiguous ON cells right of center, row 45 contains 11 contiguous ON cells left of center. Are these the only instances of contiguous ON cells that set records that are not rightmost? - _Michael De Vlieger_, Oct 06 2015 %D A094604 Wolfram, Stephen, A New Kind of Science, Wolfram Media, 2002. %H A094604 Eric Rowland, <a href="https://doi.org/10.25088/ComplexSystems.16.3.239">Local nested structure in rule 30</a>, Complex Systems 16 (2006) 239-258. %H A094604 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Rule30.html">Rule 30</a> %H A094604 <a href="/index/Ce#cell">Index entries for sequences related to cellular automata</a> %e A094604 From _Michael De Vlieger_, Oct 06 2015: (Start) %e A094604 First 12 rows, replacing "0" with ".", ignoring "0" outside of range of 1's, for better visibility of ON cells, the number of contiguous rightmost ON cells of each row appears at left: %e A094604 1 1 %e A094604 3 1 1 1 %e A094604 1 1 1 . . 1 %e A094604 4 1 1 . 1 1 1 1 %e A094604 1 1 1 . . 1 . . . 1 %e A094604 3 1 1 . 1 1 1 1 . 1 1 1 %e A094604 1 1 1 . . 1 . . . . 1 . . 1 %e A094604 6 1 1 . 1 1 1 1 . . 1 1 1 1 1 1 %e A094604 1 1 1 . . 1 . . . 1 1 1 . . . . . 1 %e A094604 3 1 1 . 1 1 1 1 . 1 1 . . 1 . . . 1 1 1 %e A094604 1 1 1 . . 1 . . . . 1 . 1 1 1 1 . 1 1 . . 1 %e A094604 4 1 1 . 1 1 1 1 . . 1 1 . 1 . . . . 1 . 1 1 1 1 %e A094604 1 1 1 . . 1 . . . 1 1 1 . . 1 1 . . 1 1 . 1 . . . 1 %e A094604 Thus the sequence starts with {1, 3, 4, 6, ...} as these set new records for the number of contiguous rightmost ON cells in each row. %e A094604 (End) %t A094604 t = Length /@ Map[Last, Split /@ CellularAutomaton[30, {{1}, 0}, 6000] /. 0 -> Nothing /. {} -> Nothing]; a = {0}; Do[If[t[[n]] > Max@ a, AppendTo[a, t[[n]]]], {n, Length@ t}]; Rest@ a (* _Michael De Vlieger_, Oct 06 2015 *) %o A094604 (C++) %o A094604 #include <iostream> %o A094604 using namespace std; %o A094604 #ifdef _MSC_VER %o A094604 // If compiler MSVC %o A094604 #include <cstdint> %o A094604 using custom_uint = uint64_t; %o A094604 constexpr int max_j = 126; %o A094604 #else %o A094604 // gnu c++ or clang %o A094604 // g++ A094604.cpp -O3 -o A094604.exe %o A094604 // clang++ -O3 A094604.cpp -o A094604.exe %o A094604 #include <stdint.h> %o A094604 using custom_uint = __uint128_t; %o A094604 constexpr int max_j = 128; %o A094604 #endif %o A094604 int main() %o A094604 { %o A094604 custom_uint state = 1; %o A094604 custom_uint n; %o A094604 int A094604[max_j] = { 0 }; %o A094604 A094604[0] = 1; %o A094604 for (int j = 1; j < max_j; ++j) { %o A094604 for (custom_uint i = (1ULL << (j - 1)) + 1; i <= (1ULL << j); ++i) { %o A094604 state = state ^ ((2 * state) | (4 * state)); %o A094604 } %o A094604 n = state + 1; %o A094604 if (n == 0) %o A094604 { %o A094604 cout << "Stack overflow!"; %o A094604 return 1; %o A094604 } %o A094604 int two_adic_val = 0; %o A094604 while (n % 2 == 0) { %o A094604 n = n / 2; %o A094604 two_adic_val++; %o A094604 } %o A094604 A094604[j] = two_adic_val; %o A094604 for (int i = 0; i < j; ++i) { %o A094604 cout << A094604[i]; %o A094604 if (i < j - 1) { %o A094604 cout << ", "; %o A094604 } %o A094604 } %o A094604 cout << endl; %o A094604 } %o A094604 return 0; %o A094604 } %o A094604 // _Miles Wilson_, Apr 13 2025 %Y A094604 Cf. A094603, A094605, A094606. %K A094604 nonn,more %O A094604 0,2 %A A094604 _Eric Rowland_, May 13 2004; revised Aug 10 2005 %E A094604 More terms from _Eric Rowland_, Jan 21 2006 %E A094604 a(42) from _Eric Rowland_, Jul 03 2015 %E A094604 a(43)-a(46) from _Miles Wilson_, Apr 13 2025