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 A151905 #12 Feb 16 2023 05:12:43 %S A151905 0,1,0,0,0,1,0,0,1,1,1,4,0,0,1,1,1,4,1,1,4,4,4,13,0,0,1,1,1,4,1,1,4,4, %T A151905 4,13,1,1,4,4,4,13,4,4,13,13,13,40,0,0,1,1,1,4,1,1,4,4,4,13,1,1,4,4,4, %U A151905 13,4,4,13,13,13,40,1,1,4,4,4,13,4,4,13,13,13,40,4,4,13,13,13,40,13 %N A151905 a(0) = a(2) = 0, a(1) = 1; for n >= 3, n = 3*2^k+j, 0 <= j < 3*2^k, a(n) = A151904(j). %C A151905 Consider the Holladay-Ulam CA shown in Fig. 2 and Example 2 of the Ulam article. Then a(n) is the number of cells turned ON in generation n in a 45-degree sector that are not on the main stem. %D A151905 S. Ulam, On some mathematical problems connected with patterns of growth of figures, pp. 215-224 of R. E. Bellman, ed., Mathematical Problems in the Biological Sciences, Proc. Sympos. Applied Math., Vol. 14, Amer. Math. Soc., 1962. %H A151905 David Applegate, Omar E. Pol and N. J. A. Sloane, <a href="/A000695/a000695_1.pdf">The Toothpick Sequence and Other Sequences from Cellular Automata</a>, Congressus Numerantium, Vol. 206 (2010), 157-191. [There is a typo in Theorem 6: (13) should read u(n) = 4.3^(wt(n-1)-1) for n >= 2.] %H A151905 N. J. A. Sloane, <a href="/wiki/Catalog_of_Toothpick_and_CA_Sequences_in_OEIS">Catalog of Toothpick and Cellular Automata Sequences in the OEIS</a> %H A151905 N. J. A. Sloane, <a href="/A151907/a151907.jpg">Illustration of initial terms</a> (annotated copy of figure on p. 222 of Ulam) %e A151905 If written as a triangle: %e A151905 0, %e A151905 1, 0, %e A151905 0, 0, 1, %e A151905 0, 0, 1, 1, 1, 4, %e A151905 0, 0, 1, 1, 1, 4, 1, 1, 4, 4, 4, 13, %e A151905 0, 0, 1, 1, 1, 4, 1, 1, 4, 4, 4, 13, 1, 1, 4, 4, 4, 13, 4, 4, 13, 13, 13, 40 %e A151905 0, 0, 1, 1, 1, 4, 1, 1, 4, 4, 4, 13, 1, 1, 4, 4, 4, 13, 4, 4, 13, 13, 13, 40, 1, 1, 4, 4, 4, 13, 4, 4, 13, 13, 13, 40, 4, 4, 13, 13, 13, 40, 13, 13, 40, 40, 40, 121, %e A151905 ... %e A151905 then the rows converge to A151904. %p A151905 f := proc(n) local j; j:=n mod 6; if (j<=1) then 0 elif (j<=4) then 1 else 2; fi; end; %p A151905 wt := proc(n) local w,m,i; w := 0; m := n; while m > 0 do i := m mod 2; w := w+i; m := (m-i)/2; od; w; end; %p A151905 A151904 := proc(n) local k,j; k:=floor(n/6); j:=n-6*k; (3^(wt(k)+f(j))-1)/2; end; %p A151905 A151905 := proc (n) local k,j; %p A151905 if (n=0) then 0; %p A151905 elif (n=1) then 1; %p A151905 elif (n=2) then 0; %p A151905 else k:=floor( log(n/3)/log(2) ); j:=n-3*2^k; A151904(j); fi; %p A151905 end; %t A151905 wt[n_] := DigitCount[n, 2, 1]; %t A151905 f[n_] := {0, 0, 1, 1, 1, 2}[[Mod[n, 6] + 1]]; %t A151905 A151902[n_] := wt[Floor[n/6]] + f[n - 6 Floor[n/6]]; %t A151905 A151904[n_] := (3^A151902[n] - 1)/2; %t A151905 a[n_] := Module[{k, j}, Switch[n, 0, 0, 1, 1, 2, 0, _, k = Floor[Log2[n/3]]; j = n - 3*2^k; A151904[j]]]; %t A151905 Table[a[n], {n, 0, 90}] (* _Jean-François Alcover_, Feb 16 2023, after Maple code *) %Y A151905 Cf. A151904, A151906, A151907, A139250, A151895, A151896. %K A151905 nonn,tabf %O A151905 0,12 %A A151905 _N. J. A. Sloane_, Jul 31 2009