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.

A256530 Number of ON cells at n-th stage in simple 2-dimensional cellular automaton (see Comments lines for definition).

This page as a plain text file.
%I A256530 #87 Nov 15 2023 15:07:13
%S A256530 0,1,9,21,49,61,97,157,225,237,273,333,417,525,657,813,961,973,1009,
%T A256530 1069,1153,1261,1393,1549,1729,1933,2161,2413,2689,2989,3313,3661,
%U A256530 3969,3981,4017,4077,4161,4269,4401,4557,4737,4941,5169,5421,5697,5997,6321,6669,7041,7437,7857,8301,8769,9261,9777,10317,10881,11469
%N A256530 Number of ON cells at n-th stage in simple 2-dimensional cellular automaton (see Comments lines for definition).
%C A256530 On the infinite square grid at stage 0 there are no ON cells, so a(0) = 0.
%C A256530 At stage 1, only one cell is turned ON, so a(1) = 1.
%C A256530 If n is a power of 2 so the structure is a square of side length 2n - 1 that contains (2n-1)^2 ON cells.
%C A256530 The structure grows by the four corners as square waves forming layers of ON cells up the next square structure, and so on (see example).
%C A256530 Note that a(24) = 1729 is also the Hardy-Ramanujan number (see A001235).
%C A256530 Has the same rules as A256534 but here a(1) = 1 not 4.
%C A256530 Has a smoother behavior than A160414 with which shares infinitely many terms (see example).
%C A256530 A256531, the first differences, gives the number of cells turned ON at n-th stage.
%H A256530 Paolo Xausa, <a href="/A256530/b256530.txt">Table of n, a(n) for n = 0..8191</a>
%H A256530 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 A256530 <a href="/index/Ce#cell">Index entries for sequences related to cellular automata</a>
%F A256530 For i = 1 to z: for j = 0 to 2^(i-1)-1: n = n+1: a(n) = (2^i-1)^2 + 3*(2*j)^2: next j: next i
%e A256530 With the positive terms written as an irregular triangle in which the row lengths are the terms of A011782 the sequence begins:
%e A256530 1;
%e A256530 9;
%e A256530 21,    49;
%e A256530 61,    97,  157,  225;
%e A256530 237,  273,  333,  417,  525,  657,  813,  961;
%e A256530 ...
%e A256530 Right border gives A060867.
%e A256530 This triangle T(n,k) shares with the triangle A160414 the terms of the column k, if k is a power of 2, for example both triangles share the following terms: 1, 9, 21, 49, 61, 97, 225, 237, 273, 417, 961, etc.
%e A256530 .
%e A256530 Illustration of initial terms, for n = 1..10:
%e A256530 .       _ _ _ _                       _ _ _ _
%e A256530 .      |  _ _  |                     |  _ _  |
%e A256530 .      | |  _|_|_ _ _ _ _ _ _ _ _ _ _|_|_  | |
%e A256530 .      | |_|  _ _ _ _ _ _   _ _ _ _ _ _  |_| |
%e A256530 .      |_ _| |  _ _ _ _  | |  _ _ _ _  | |_ _|
%e A256530 .          | | |  _ _  | | | |  _ _  | | |
%e A256530 .          | | | |  _|_|_|_|_|_|_  | | | |
%e A256530 .          | | | |_|  _ _   _ _  |_| | | |
%e A256530 .          | | |_ _| |  _|_|_  | |_ _| | |
%e A256530 .          | |_ _ _| |_|  _  |_| |_ _ _| |
%e A256530 .          |  _ _ _|  _| |_| |_  |_ _ _  |
%e A256530 .          | |  _ _| | |_ _ _| | |_ _  | |
%e A256530 .          | | |  _| |_ _| |_ _| |_  | | |
%e A256530 .          | | | | |_ _ _ _ _ _ _| | | | |
%e A256530 .          | | | |_ _| | | | | |_ _| | | |
%e A256530 .       _ _| | |_ _ _ _| | | |_ _ _ _| | |_ _
%e A256530 .      |  _| |_ _ _ _ _ _| |_ _ _ _ _ _| |_  |
%e A256530 .      | | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | |
%e A256530 .      | |_ _| |                     | |_ _| |
%e A256530 .      |_ _ _ _|                     |_ _ _ _|
%e A256530 .
%e A256530 After 10 generations there are 273 ON cells, so a(10) = 273.
%t A256530 With[{z=7},Join[{0},Flatten[Array[(2^#-1)^2+12Range[0,2^(#-1)-1]^2&,z]]]] (* Generates 2^z terms *) (* _Paolo Xausa_, Nov 15 2023, after _Omar E. Pol_ *)
%o A256530 (GW-BASIC) 10' a256530 First 2^z-1 terms: 20 z=6: defdbl a: for i=1 to z: for j=0 to 2^(i-1)-1: n=n+1: a(n)=(2^i-1)^2 + 3*(2*j)^2: print a(n);: next j: next i: end
%Y A256530 Cf. A000225, A011782, A001235, A060867, A139250, A147562, A160410, A160414, A256531, A256534.
%K A256530 nonn,tabf
%O A256530 0,3
%A A256530 _Omar E. Pol_, Apr 21 2015