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-10 of 32 results. Next

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.

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

A245543 First differences of A160239.

Original entry on oeis.org

7, 0, 16, -16, 56, -40, 88, -104, 56, 0, 128, -168, 168, -80, 304, -408, 56, 0, 128, -128, 448, -320, 704, -872, 168, 0, 384, -464, 784, -480, 1312, -1720, 56, 0, 128, -128, 448, -320, 704, -832, 448, 0, 1024, -1344, 1344, -640, 2432, -3304, 168, 0, 384, -384, 1344, -960, 2112, -2576, 784, 0
Offset: 0

Views

Author

N. J. A. Sloane, Jul 26 2014

Keywords

Comments

The increase in number of ON cells in A160239 in going from one step to the next.
a(n) = A160239(n+1) - A160239(n).

Crossrefs

Programs

  • Haskell
    a245542 n = a245542_list !! n
    a245542_list = scanl1 (+) a160239_list
    -- Reinhard Zumkeller, Feb 13 2015

A102376 a(n) = 4^A000120(n).

Original entry on oeis.org

1, 4, 4, 16, 4, 16, 16, 64, 4, 16, 16, 64, 16, 64, 64, 256, 4, 16, 16, 64, 16, 64, 64, 256, 16, 64, 64, 256, 64, 256, 256, 1024, 4, 16, 16, 64, 16, 64, 64, 256, 16, 64, 64, 256, 64, 256, 256, 1024, 16, 64, 64, 256, 64, 256, 256, 1024, 64, 256, 256, 1024, 256, 1024, 1024
Offset: 0

Views

Author

Paul Barry, Jan 05 2005

Keywords

Comments

Consider a simple cellular automaton, a grid of binary cells c(i,j), where the next state of the grid is calculated by applying the following rule to each cell: c(i,j) = ( c(i+1,j-1) + c(i+1,j+1) + c(i-1,j-1) + c(i-1,j+1) ) mod 2 If we start with a single cell having the value 1 and all the others 0, then the aggregate values of the subsequent states of the grid will be the terms in this sequence. - Andras Erszegi (erszegi.andras(AT)chello.hu), Mar 31 2006. See link for initial states. - N. J. A. Sloane, Feb 12 2015
This is the odd-rule cellular automaton defined by OddRule 033 (see Ekhad-Sloane-Zeilberger "Odd-Rule Cellular Automata on the Square Grid" link). - N. J. A. Sloane, Feb 25 2015
First differences of A116520. - Omar E. Pol, May 05 2010

Examples

			1 + 4*x + 4*x^2 + 16*x^3 + 4*x^4 + 16*x^5 + 16*x^6 + 64*x^7 + 4*x^8 + ...
From _Omar E. Pol_, Jun 07 2009: (Start)
Triangle begins:
  1;
  4;
  4,16;
  4,16,16,64;
  4,16,16,64,16,64,64,256;
  4,16,16,64,16,64,64,256,16,64,64,256,64,256,256,1024;
  4,16,16,64,16,64,64,256,16,64,64,256,64,256,256,1024,16,64,64,256,64,256,...
(End)
		

Crossrefs

For generating functions Prod_{k>=0} (1+a*x^(b^k)) for the following values of (a,b) see: (1,2) A000012 and A000027, (1,3) A039966 and A005836, (1,4) A151666 and A000695, (1,5) A151667 and A033042, (2,2) A001316, (2,3) A151668, (2,4) A151669, (2,5) A151670, (3,2) A048883, (3,3) A117940, (3,4) A151665, (3,5) A151671, (4,2) A102376, (4,3) A151672, (4,4) A151673, (4,5) A151674.
A151783 is a very similar sequence.
See A160239 for the analogous CA defined by Rule 204 on an 8-celled neighborhood.

Programs

  • Haskell
    a102376 = (4 ^) . a000120  -- Reinhard Zumkeller, Feb 13 2015
    
  • Maple
    seq(4^convert(convert(n,base,2),`+`),n=0..100); # Robert Israel, Apr 30 2017
  • Mathematica
    Table[4^DigitCount[n, 2, 1], {n, 0, 100}] (* Indranil Ghosh, Apr 30 2017 *)
  • PARI
    {a(n) = if( n<0, 0, 4^subst( Pol( binary(n)), x, 1))} /* Michael Somos, May 29 2008 */
    a(n) = 4^hammingweight(n); \\ Michel Marcus, Apr 30 2017
    
  • Python
    def a(n): return 4**bin(n)[2:].count("1") # Indranil Ghosh, Apr 30 2017
    
  • Python
    def A102376(n): return 1<<(n.bit_count()<<1) # Chai Wah Wu, Nov 15 2022

Formula

Formulas due to Paul D. Hanna: (Start)
G.f.: Product_{k>=0} 1 + 4x^(2^k).
a(n) = Product_{k=0..log_2(n)} 4^b(n, k), b(n, k)=coefficient of 2^k in binary expansion of n.
a(n) = Sum_{k=0..n} (C(n, k) mod 2)*3^A000120(n-k). (End)
a(n) = Sum_{k=0..n} (C(n, k) mod 2) * Sum_{j=0..k} (C(k, j) mod 2) * Sum_{i=0..j} (C(j, i) mod 2). - Paul Barry, Apr 01 2005
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = w * (u^2 - 2*u*v + 5*v^2) - 4*v^3. - Michael Somos, May 29 2008
Run length transform of A000302. - N. J. A. Sloane, Feb 23 2015

A246035 Number of odd terms in f^n, where f = (1/x+1+x)*(1/y+1+y).

Original entry on oeis.org

1, 9, 9, 25, 9, 81, 25, 121, 9, 81, 81, 225, 25, 225, 121, 441, 9, 81, 81, 225, 81, 729, 225, 1089, 25, 225, 225, 625, 121, 1089, 441, 1849, 9, 81, 81, 225, 81, 729, 225, 1089, 81, 729, 729, 2025, 225, 2025, 1089, 3969, 25, 225, 225, 625, 225, 2025, 625, 3025, 121, 1089, 1089, 3025, 441, 3969, 1849, 7225, 9, 81, 81, 225, 81, 729, 225
Offset: 0

Views

Author

N. J. A. Sloane, Aug 20 2014

Keywords

Comments

This is the number of ON cells in a certain 2-D CA in which the neighborhood of a cell is defined by f, and in which a cell is ON iff there was an odd number of ON cells in the neighborhood at the previous generation.
This is the odd-rule cellular automaton defined by OddRule 777 (see Ekhad-Sloane-Zeilberger "Odd-Rule Cellular Automata on the Square Grid" link).
Run Length Transform of {A001045(k+2)^2} (or of A139818).
The Run Length Transform of a sequence {S(n), n>=0} is defined to be the sequence {T(n), n>=0} given by T(n) = Product_i S(i), where i runs through the lengths of runs of 1's in the binary expansion of n. E.g. 19 is 10011 in binary, which has two runs of 1's, of lengths 1 and 2. So T(19) = S(1)*S(2). T(0)=1 (the empty product).

Examples

			Here is the neighborhood:
[X, X, X]
[X, X, X]
[X, X, X]
which contains a(1) = 9 ON cells.
.
From Omar E. Pol, Mar 17 2015: (Start)
Apart from the initial 1, the sequence can be written also as an irregular tetrahedron T(s,r,k) = A139818(r+2) * a(k), s>=1, 1<=r<=s, 0<=k<=(A011782(s-r)-1) as shown below:
..
9;
...
9;
25;
..........
9,     81;
25;
121;
....................
9,     81,  81, 225;
25,   225;
121;
441;
........................................
9,     81,  81, 225, 81, 729, 225, 1089;
25,   225, 225, 625;
121, 1089;
441;
1849;
...
Note that every row r is equal to A139818(r+2) times the beginning of the sequence itself, thus in 3D every column contains the same number: T(s,r,k) = T(s+1,r,k).
(End)
		

Crossrefs

Other CA's that use the same rule but with different cell neighborhoods: A160239, A102376, A071053, A072272, A001316, A246034.

Programs

  • Maple
    C:=f->subs({x=1, y=1}, f);
    # Find number of ON cells in CA for generations 0 thru M defined by rule
    # that cell is ON iff number of ON cells in nbd at time n-1 was odd
    # where nbd is defined by a polynomial or Laurent series f(x, y).
    OddCA:=proc(f, M) global C; local n, a, i, f2, p;
    f2:=simplify(expand(f)) mod 2;
    a:=[]; p:=1;
    for n from 0 to M do a:=[op(a), C(p)]; p:=expand(p*f2) mod 2; od:
    lprint([seq(a[i], i=1..nops(a))]);
    end;
    f:=(1/x+1+x)*(1/y+1+y);
    OddCA(f, 70);
  • Mathematica
    b[0] = 1; b[n_] := b[n] = Expand[b[n - 1]*(x^2 + x + 1)];
    a[n_] := Count[CoefficientList[b[n], x], _?OddQ]^2;
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Apr 30 2017 *)

Formula

a(n) = A071053(n)^2.

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

A245196 Write n>=1 as either n=2^k-2^r with 0 <= r <= k-1, in which case a(2^k-2^r)=wt(k-r-1), or as n=2^k-2^r+j with 2 <= r <= k-1, 1 <= j < 2^r-1, in which case a(2^k-2^r+j)=a(j)*wt(k-r-1) (where wt(i) = A000120(i)).

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 2, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0
Offset: 1

Views

Author

N. J. A. Sloane, Jul 25 2014

Keywords

Comments

Other sequences defined by a recurrence of this class (see the Formula and Maple sections) include A245180, A245195, A048896, A245536, A038374.

Examples

			May be arranged into blocks of lengths 1,2,4,8,...:
0,
0, 1,
0, 0, 1, 1,
0, 0, 0, 0, 1, 0, 1, 2,
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 2, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 2, 0, 1, 2,
...
		

Crossrefs

Programs

  • Maple
    Maple code for this sequence:
    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:
    G:=[seq(wt(n),n=0..30)];
    m:=1;
    f:=proc(n) option remember; global m,G; local k,r,j,np;
       k:=1+floor(log[2](n)); np:=2^k-n;
       if np=1 then r:=0; j:=0; else r:=1+floor(log[2](np-1)); j:=2^r-np; fi;
       if j=0 then G[k-r]; else m*G[k-r]*f(j); fi;
    end;
    [seq(f(n),n=1..120)];
    # Maple code for the general recurrence:
    G:=[seq(wt(n),n=0..30)]; # replace this by a list G=[G(0), G(1), G(2), ...], remembering that you have to tell Maple G[1] to get G(0), G[2] to get G(1), etc.
    m:=1; # replace this by the correct multiplier
    f:=proc(n) option remember; global m,G; local k,r,j,np;
       k:=1+floor(log[2](n)); np:=2^k-n;
       if np=1 then r:=0; j:=0; else r:=1+floor(log[2](np-1)); j:=2^r-np; fi;
       if j=0 then G[k-r-1+1]; else m*G[k-r-1+1]*f(j); fi;
    end;
    [seq(f(n),n=1..120)];
    # If G(n) = wt(n) and m=1 we get the present sequence
    # If G(n) = A083424(n) and m=1 we get A245537
    # If G(n) = A083424(n) and m=2 we get A245538
    # If G(n) = A083424(n) and m=4 we get A245539
    # If G(n) = A083424(n) and m=8 we get A245180 (and presumably A160239)
    # If G(n) = n (n>=0) and m=1 we get A245536
    # If G(n) = n+1 (n>=0) and m=1 we get A038374
    # If G(n) = (n+1)(n+2)/2 (n>=0) and m=1 we get A245541
    # If G(n) = (n+1)(n+2)/2 (n>=0) and m=2 we get A245547
    # If G(n) = 2^n (n>=0) and m=1 we get A245195 (= 2^A014081)
    # If G(n) = 2^n (n>=0) and m=2 we get A048896

Formula

This is an example of a class of sequences defined by the following recurrence.
We first choose a sequence G = [G(0), G(1), G(2), G(3), ...], which are the terms that will appear at the ends of the blocks: a(2^k-1) = G(k-1), and we also choose a parameter m (the "multiplier"). Then the recurrence (this defines a(1), a(2), a(3), ...) is:
a(2^k-2^r)=G(k-r-1) if 0 <= r <= k-1, a(2^k-2^r+j)=m*a(j)*G(k-r-1) if 2 <= r <= k-1, 1 <= j < 2^r-1.
To help apply the recurrence, here are the values of k,r,j for the first few values of n (if n=2^k-2^r we set j=0, although it is not used):
n: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
k: 1 2 2 3 3 3 3 4 4 4 4 4 4 4 4
r: 0 1 0 2 2 1 0 3 3 3 3 2 2 1 0
j: 0 0 0 0 1 0 0 0 1 2 3 0 1 0 0
--------------------------------------------------
n: 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
k: 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
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
--------------------------------------------------
In the present example G(n) = wt(n) and m=1.

A246034 Number of odd terms in f^n, where f = x^4*y^4 + x^4*y^3 + x^3*y^4 + x^4*y^2 + x^2*y^4 + x^4*y + x^3*y^2 + x^2*y^3 + x*y^4 + x^4 + x^2*y^2 + y^4 + x^3 + x^2*y + x*y^2 + y^3 + x^2 + y^2 + x + y + 1.

Original entry on oeis.org

1, 21, 21, 85, 21, 233, 85, 321, 21, 441, 233, 761, 85, 1137, 321, 1545, 21, 441, 441, 1785, 233, 2925, 761, 3589, 85, 1785, 1137, 3977, 321, 4549, 1545, 5909, 21, 441, 441, 1785, 441, 4893, 1785, 6741, 233, 4893, 2925, 9949, 761, 11301, 3589, 13181, 85, 1785, 1785
Offset: 0

Views

Author

N. J. A. Sloane, Aug 20 2014

Keywords

Comments

This is the number of ON cells in a certain 2-D CA in which the neighborhood of a cell is defined by f, and in which a cell is ON iff there was an odd number of ON cells in the neighborhood at the previous generation.

Examples

			Here is the neighborhood:
[X, X, X, X, X]
[X, 0, X, 0, X]
[X, X, X, X, X]
[X, 0, X, 0, X]
[X, X, X, X, X]
which contains a(1) = 21 ON cells.
		

Crossrefs

Other CA's that use the same rule but with different cell neighborhoods: A160239, A102376, A071053, A072272, A001316, A246035.

Programs

  • Maple
    C:=f->subs({x=1, y=1}, f);
    # Find number of ON cells in CA for generations 0 thru M defined by rule
    # that cell is ON iff number of ON cells in nbd at time n-1 was odd
    # where nbd is defined by a polynomial or Laurent series f(x, y).
    OddCA:=proc(f, M) global C; local n, a, i, f2, p;
    f2:=simplify(expand(f)) mod 2;
    a:=[]; p:=1;
    for n from 0 to M do a:=[op(a), C(p)]; p:=expand(p*f2) mod 2; od:
    lprint([seq(a[i], i=1..nops(a))]);
    end;
    f:=x^4*y^4+x^4*y^3+x^3*y^4+x^4*y^2+x^2*y^4+x^4*y+x^3*y^2+x^2*y^3+x*y^4+x^4+
       x^2*y^2+y^4+x^3+x^2*y+x*y^2+y^3+x^2+y^2+x+y+1;
    OddCA(f, 100);
  • Mathematica
    f = x^4*y^4 + x^4*y^3 + x^3*y^4 + x^4*y^2 + x^2*y^4 + x^4*y + x^3*y^2 + x^2*y^3 + x*y^4 + x^4 + x^2*y^2 + y^4 + x^3 + x^2*y + x*y^2 + y^3 + x^2 + y^2 + x + y + 1;
    a[0] = 1; a[n_] := Count[List @@ Expand[f^n] /. {x -> 1, y -> 1}, _?OddQ];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Dec 11 2017 *)

A247640 Number of ON cells after n generations of "Odd-Rule" cellular automaton on hexagonal lattice based on 6-celled neighborhood.

Original entry on oeis.org

1, 6, 6, 24, 6, 36, 24, 96, 6, 36, 36, 144, 24, 144, 96, 384, 6, 36, 36, 144, 36, 216, 144, 576, 24, 144, 144, 576, 96, 576, 384, 1536, 6, 36, 36, 144, 36, 216, 144, 576, 36, 216, 216, 864, 144, 864, 576, 2304, 24, 144, 144, 576, 144, 864
Offset: 0

Views

Author

N. J. A. Sloane, Sep 22 2014

Keywords

Comments

The neighborhood of a cell consists of the six surrounding cells (but not the cell itself). A cell is ON at generation n iff an odd number of its neighbors were ON at the previous generation. We start with one ON cell.
This is the Run Length Transform of the sequence 1, 6, 24, 96, 384, 1536, 6144, 24576, ... (almost certainly A164908, or 1 followed by A002023).
It appears that this is also the sequence corresponding to the odd-rule cellular automaton defined by OddRule 356 (see Ekhad-Sloane-Zeilberger "Odd-Rule Cellular Automata on the Square Grid" link). - N. J. A. Sloane, Feb 26 2015

Crossrefs

Programs

  • Maple
    C := f->`if`(type(f,`+`),nops(f),1);
    f := 1/x+x+1/y+y+1/(x*y)+x*y;
    g := n->expand(f^n) mod 2;
    [seq(C(g(n)),n=0..100)];
  • Mathematica
    A247640[n_] := Total[CellularAutomaton[{42, {2, {{1, 1, 0}, {1, 0, 1}, {0, 1, 1}}}, {1, 1}}, {{{1}}, 0}, {{{n}}}], 2]; Array[A247640, 54, 0] (* JungHwan Min, Sep 06 2016 *)
    A247640L[n_] := Total[#, 2] & /@ CellularAutomaton[{42, {2, {{1, 1, 0}, {1, 0, 1}, {0, 1, 1}}}, {1, 1}}, {{{1}}, 0}, n]; A247640L[53] (* JungHwan Min, Sep 06 2016 *)

Formula

a(n) = number of terms in expansion of f^n mod 2, where f = 1/x+x+1/y+y+1/(x*y)+x*y (mod 2);

A247666 Number of ON cells after n generations of "Odd-Rule" cellular automaton on hexagonal lattice based on 7-celled neighborhood.

Original entry on oeis.org

1, 7, 7, 25, 7, 49, 25, 103, 7, 49, 49, 175, 25, 175, 103, 409, 7, 49, 49, 175, 49, 343, 175, 721, 25, 175, 175, 625, 103, 721, 409, 1639, 7, 49, 49, 175, 49, 343, 175, 721, 49, 343, 343, 1225, 175, 1225, 721, 2863, 25, 175, 175, 625
Offset: 0

Views

Author

N. J. A. Sloane, Sep 22 2014

Keywords

Comments

The neighborhood of a cell consists of the cell itself together with its six surrounding cells. A cell is ON at generation n iff an odd number of its neighbors were ON at the previous generation. We start with one ON cell.
This is the Run Length Transform of the sequence 1,7,25,103,409,1639,26215,... (almost certainly A102900).
This appears to be the same as the number of ON cells in a certain 2-D CA on the square grid in which the neighborhood of a cell is defined by f = 1/(x*y)+1/x+1/x*y+1/y+x/y+x+x*y, and in which a cell is ON iff there was an odd number of ON cells in the neighborhood at the previous generation. Here is the neighborhood:
[X, 0, X]
[X, 0, X]
[X, X, X]
which contains a(1) = 7 ON cells.
This is the odd-rule cellular automaton defined by OddRule 557 (see Ekhad-Sloane-Zeilberger "Odd-Rule Cellular Automata on the Square Grid" link).
Furthermore, this is also the number of ON cells in the 2-D CA on the square grid in which the neighborhood of a cell is defined by f = 1/(x*y)+1/x+1/y+1+y+x+x*y, with the same rule. Here is the neighborhood:
[0, X, X]
[X, X, X]
[X, X, 0]
- N. J. A. Sloane, Feb 19 2015
This is the odd-rule cellular automaton defined by OddRule 376 (see Ekhad-Sloane-Zeilberger "Odd-Rule Cellular Automata on the Square Grid" link).
The partial sums are in A253767 in which the structure looks like an irregular stepped pyramid, apparently with a like-hexagonal base. - Omar E. Pol, Jan 29 2015

Examples

			From _Omar E. Pol_, Jan 29 2015: (Start)
May be arranged into blocks of sizes A011782:
1;
7;
7, 25;
7, 49, 25, 103;
7, 49, 49, 175, 25, 175, 103, 409;
7, 49, 49, 175, 49, 343, 175, 721, 25, 175, 175, 625, 103, 721, 409, 1639;
7, 49, 49, 175, 49, 343, 175, 721, 49, 343, 343, 1225, 175, 1225, 721, 2863, 25, 175, 175, 625, ...
It appears that right border gives A102900 without repetitions, see Comments section. [This is just a restatement of the fact that this sequence is the run length transform of what is presumably A102900. - _N. J. A. Sloane_, Feb 06 2015]
(End)
From _Omar E. Pol_, Mar 19 2015: (Start)
Also, the sequence can be written as an irregular tetrahedron T(s,r,k) as shown below:
1;
..
7;
..
7;
25;
.........
7,    49;
25;
103;
...................
7,    49,  49, 175;
25,  175;
103;
409;
......................................
7,    49,  49, 175, 49, 343, 175, 721;
25,  175, 175, 625;
103, 721;
409;
1639;
...
Apart from the initial 1, we have that T(s,r,k) = T(s+1,r,k).
(End)
		

Crossrefs

Programs

  • Maple
    C := f->`if`(type(f,`+`),nops(f),1);
    f := 1+1/x+x+1/y+y+1/(x*y)+x*y;
    g := n->expand(f^n) mod 2;
    [seq(C(g(n)),n=0..100)];
  • Mathematica
    A247666[n_] := Total[CellularAutomaton[{170, {2, {{1, 1, 0}, {1, 1, 1}, {0, 1, 1}}}, {1, 1}}, {{{1}}, 0}, {{{n}}}], 2]; Array[A247666, 52, 0] (* JungHwan Min, Sep 01 2016 *)
    A247666L[n_] := Total[#, 2] & /@ CellularAutomaton[{170, {2, {{1, 1, 0}, {1, 1, 1}, {0, 1, 1}}}, {1, 1}}, {{{1}}, 0}, n]; A247666L[51] (* JungHwan Min, Sep 01 2016 *)

Formula

a(n) = number of terms in expansion of f^n mod 2, where f = 1+1/x+x+1/y+y+1/(x*y)+x*y (mod 2);
Showing 1-10 of 32 results. Next