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.

Showing 1-3 of 3 results.

A245180 A160239(n)/8.

Original entry on oeis.org

1, 1, 3, 1, 8, 3, 14, 1, 8, 8, 24, 3, 24, 14, 52, 1, 8, 8, 24, 8, 64, 24, 112, 3, 24, 24, 72, 14, 112, 52, 216, 1, 8, 8, 24, 8, 64, 24, 112, 8, 64, 64, 192, 24, 192, 112, 416, 3, 24, 24, 72, 24, 192, 72, 336, 14, 112, 112, 336, 52, 416, 216, 848, 1, 8, 8, 24, 8, 64, 24, 112, 8, 64, 64, 192
Offset: 1

Views

Author

N. J. A. Sloane, Jul 16 2014

Keywords

Examples

			The entries may be arranged into blocks of sizes 1,2,4,8,...:
B_0: 1,
B_1: 1, 3,
B_2: 1, 8, 3, 14,
B_3: 1, 8, 8, 24, 3, 24, 14, 52,
B_4: 1, 8, 8, 24, 8, 64, 24, 112, 3, 24, 24, 72, 14, 112, 52, 216,
B_5: 1, 8, 8, 24, 8, 64, 24, 112, 8, 64, 64, 192, 24, 192, 112, 416, 3, 24, 24, 72, 24, 192, 72, 336, 14, 112, 112, 336, 52, 416, 216, 848,
...
The first half of each block is equal to 1 followed by 8 times an initial segment of the sequence itself.
The next quarter of each block consists of 3 times (1 followed by 8 times an initial segment of the sequence itself).
The next one-eighth of each block consists of 14 times (1 followed by 8 times an initial segment of the sequence itself).
And so on, the successive multipliers 1,3,14,52,... being given by A083424.
Also, the final quarter of any block consists of the twice the last half of the previous block added to eight times the full block before that.
Consider for example the 4th block,
[1, 8, 8, 24, 8, 64, 24, 112; 3, 24, 24, 72; 14, 112, 52, 216].
This is [1 8*(1,1,3,1,8,3,14); 3*(1 8*(1,1,3)); 2*(3,24,14,52)+8*(1,8,3,14)].
The final entries in the blocks give A083424.
See also the formula section.
.
From _Omar E. Pol_, Mar 18 2015: (Start)
Also, the sequence can be written as an irregular tetrahedron T(s,r,k) as shown below:
1;
..
1;
3;
........
1,    8;
3;
14;
................
1,    8,  8, 24;
3,   24;
14;
52;
..................................
1,    8,  8, 24,  8,  64, 24, 112;
3,   24, 24, 72;
14, 112;
52;
216;
.....................................................................
1,    8,  8, 24,  8,  64, 24, 112, 8, 64, 64, 192, 24, 192, 112, 416;
3,   24, 24, 72, 24, 192, 72, 336;
14, 112,112,336;
52, 416;
216;
848;
...
Note that T(s,r,k) = T(s+1,r,k).
(End)
		

Crossrefs

See A245181 for the numbers that appear.

Programs

  • Haskell
    a245180 = flip div 8 . a160239  -- Reinhard Zumkeller, Feb 13 2015
  • Maple
    R:=proc(n) option remember;
    if n=1 then 1
    elif (n mod 2) = 0 then R(n/2)
    elif (n mod 4) = 3 then 2*R((n-1)/2)+R(n-2)
    else 8*R((n-1)/4); fi; end;
    [seq(R(n),n=1..200)];
  • Mathematica
    R[n_] := R[n] = Which[n == 1, 1, Mod[n, 2] == 0, R[n/2], Mod[n, 4] == 3, 2*R[(n - 1)/2] + R[n - 2], True, 8*R[(n - 1)/4] ];
    Array[R, 200] (* Jean-François Alcover, Nov 16 2017, translated from Maple *)

Formula

The following is a fairly simple explicit formula for a(n) as a function of n: a(n) = 8^(r-1) * Product_{lengths i of runs of 1 in binary expansion of n} R(i), where r is the number of runs of 1 in the binary expansion of n and R(i) = A083424(i-1) = (5*4^(i-1)+(-2)^(i-1))/6. Note that row i of the table in A245562 lists the lengths of runs of 1 in binary expansion of i. Example: n = 27 = 11011 in binary, there are two runs each of length 2, so r=1, R(2) = A083424(1) = 3, and so a(27) = 8^1*3*3 = 72. - N. J. A. Sloane, Aug 10 2014
Many 2-D cellular automata studied in the Toothpick paper (Applegate et al.) have a recursive formula for the general term in a typical block of 2^k terms (see Equations 2, 4, 5, 9, 10 12, 38, 39 of that paper). An analogous formula for the present sequence is the following.
Consider the block B_{k-1} containing terms a(2^(k-1)), a(2^(k-1)+1), ..., a(2^k-1). It is convenient to index the terms working backwards from the next, 2^k-th, term. For n in the range 2^(k-1) <= n < 2^k, write n = 2^k-2^r+j, with 0 <= r <= k-1 and 0 <= j < 2^(r-1), and j=0 if r=0. Then
(if j=0) a(2^k-2^r) = f(k-r-1),
(if j>0) a(2^k-2^r+j) = 8*f(k-r-1)*a(j),
where f(i) = A083424(i) = (5*4^i+(-2)^i)/6.
For example, here is block B_4, consisting of terms a(16)=a(31), so k=5:
n: 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
a(n): 1 8 8 24 8 64 24 112 3 24 24 72 14 112 52 216
r: 4 4 4 4 4 4 4 4 3 3 3 3 2 2 1 0
j: 0 1 2 3 4 5 6 7 0 1 2 3 0 1 0 0
Then we have a(24) = a(32-8) = f(5-3-1) = f(1) = 3, illustrating the first equation, and a(21) = a(32-16+5) = 8*f(0)*a(5) = 8*1*8 = 64, illustrating the second equation.
See A245196 for a list of sequences produced by this type of recurrence.

A319018 Number of ON cells after n generations of two-dimensional automaton based on knight moves (see Comments for definition).

Original entry on oeis.org

0, 1, 9, 17, 57, 65, 121, 145, 265, 273, 329, 377, 617, 657, 865, 921, 1201, 1209, 1265, 1313, 1553, 1617, 2001, 2121, 2689, 2745, 3009, 3153, 3841, 3953, 4513, 4649, 5297, 5305, 5361, 5409, 5649, 5713, 6097, 6233, 6881, 6953, 7353, 7585, 8713, 8913, 9961
Offset: 0

Views

Author

Rémy Sigrist, Sep 08 2018

Keywords

Comments

The cells are the squares of the standard square grid.
Cells are either OFF or ON, once they are ON they stay ON forever.
Each cell has 8 neighbors, the cells that are a knight's move away.
We begin in generation 1 with a single ON cell.
A cell is turned ON at generation n+1 if it has exactly one ON neighbor at generation n.
(Since cells stay ON, an equivalent definition is that a cell is turned ON at generation n+1 if it has exactly one neighbor that has been turned ON at some earlier generation. - N. J. A. Sloane, Dec 19 2018)
This sequence has similarities with A151725: here we use knight moves, there we use king moves.
This is a knight's-move version of the Ulam-Warburton cellular automaton (see A147562). - N. J. A. Sloane, Dec 21 2018
The structure has dihedral D_8 symmetry (quarter-turn rotations plus reflections, which generate the dihedral group D_8 of order 8), so A319019 is a multiple of 8 (compare A322050). - N. J. A. Sloane, Dec 16 2018
From Omar E. Pol, Dec 16 2018: (Start)
For n >> 1 (for example: n = 257) the structure of this sequence is similar to the structure of both A194270 and of A220500, the D-toothpick cellular automata of the second kind and of the third kind respectively. The animations of both CAs are in the Applegate's movie version.
Also, the graph of A319018 is a bit similar to the graph of A245540, which is essentially a 45-degree-3D-wedge of A245542 (a pyramid) which is the partial sums of A160239 (Fredkin's replicator). See "Plot 2": A319018 vs. A245540. (End)
The conjecture that A322050(2^k+1)=1 also suggests a fractal geometry. Let P_k be the associated set of eight points. It appears that P_k may be written as the intersection of four fixed lines, y = +-2*x and x = +-2*y, with a circle, x^2 + y^2 = 5*4^k (see linked image "Log-Periodic Coloring"). - Bradley Klee, Dec 16 2018
In many of these toothpick or cellular automata sequences it is common to see graphs which look like some version of the famous blancmange curve (also known as the Takagi curve). I expect that is what we are seeing when we look at the graph of A322049, although we probably need to go a lot further out before the true shape becomes apparent. - N. J. A. Sloane, Dec 17 2018
The graph of A322049 (related to first differences of this sequence) appears to have rather a self-similar structure which repeats at powers of 2, and more specifically at 2^10 = 1024. There is no central symmetry or continuity, which are characteristic properties of the blancmange curve. - M. F. Hasler, Dec 28 2018
The 8 points added in generation n = 2^k + 1 are P_k = 2^k*K where K = {(+-2, +-1), (+-1, +-2)} is the set of the initial 8 knight moves. So P_k is indeed the intersection of the rays of slope +-1/2 resp. +-2 and a circle of radius 2^k*sqrt(5). In the subsequent generation n = 2^k + 2, the new cells switched on are exactly the 7 "new" knight move neighbors of these 8 cells, (P_k + K) \ (2^k - 1)*K. The 8th neighbor, lying one knight move closer to the origin, has been switched on in generation 2^k, together with an octagonal "wall" consisting of every other cell on horizontal and vertical segments between these points (2^k - 1)*K, and all cells on the diagonal segments between these points, as well as 2 more diagonals just next to these (on the inner side) and shorter by 2 cells (so they are empty for k = 1). This yields 4*(2 + (2^k - 2)*(1+3)) new ON cells in generation 2^k, plus 8*(2^(k-1) - 2) more new ON cells on horizontal, vertical and diagonal lines 4 units closer to the origin for k > 2, and similar additional terms for k > 4 etc. - M. F. Hasler, Dec 28 2018

Crossrefs

Cf. A151725, A319019 (first differences).
For further analysis see A322048, A322049, A322050, A322051.
See A322055, A322056 for a variation.

Programs

Formula

No formula or recurrence is presently known. See A322049 for a promising attack. - N. J. A. Sloane, Dec 16 2018
a(n) = Sum_{k=1..n} A319019(n) = 1 + 8*Sum_{k=2..n} A322050(n) for n >= 1. In particular, a(n) - 1 is divisible by 8 for all n >= 1. - M. F. Hasler, Dec 28 2018

Extensions

Deleted an incorrect illustration. - N. J. A. Sloane, Dec 17 2018

A245542 Partial sums of A160239.

Original entry on oeis.org

1, 9, 17, 41, 49, 113, 137, 249, 257, 321, 385, 577, 601, 793, 905, 1321, 1329, 1393, 1457, 1649, 1713, 2225, 2417, 3313, 3337, 3529, 3721, 4297, 4409, 5305, 5721, 7449, 7457, 7521, 7585, 7777, 7841, 8353, 8545, 9441, 9505, 10017, 10529, 12065
Offset: 0

Views

Author

N. J. A. Sloane, Jul 26 2014

Keywords

Comments

Also, total number of cubic ON cells after n generations in a three-dimensional cellular automaton where A160239(n) gives the number of cubic ON cells in the n-th level of the structure starting from the top. An ON cell remains ON forever. The structure looks like an irregular stepped pyramid. - Omar E. Pol, Jan 27 2015

Crossrefs

Programs

  • Haskell
    a245542 n = a245542_list !! n
    a245542_list = scanl1 (+) a160239_list
    -- Reinhard Zumkeller, Feb 13 2015
  • Mathematica
    b[n_] := b[n] = Which[n == 1, 1, Mod[n, 2] == 0, b[n/2], Mod[n, 4] == 3, 2b[(n - 1)/2] + b[n - 2], True, 8b[(n - 1)/4]];
    Join[{1}, 1 + 8 Accumulate[Array[b, 43]]] (* Jean-François Alcover, Oct 01 2018, after Omar E. Pol *)

Formula

a(n) = 1 + 8*A245540(n), n >= 1. - Omar E. Pol, Mar 07 2015

Extensions

Offset changed to 0 by N. J. A. Sloane, Feb 06 2015
Showing 1-3 of 3 results.