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-9 of 9 results.

A071051 Number of 1's in n-th row of triangle in A071035.

Original entry on oeis.org

1, 3, 4, 7, 4, 8, 8, 15, 4, 8, 8, 16, 8, 16, 16, 31, 4, 8, 8, 16, 8, 16, 16, 32, 8, 16, 16, 32, 16, 32, 32, 63, 4, 8, 8, 16, 8, 16, 16, 32, 8, 16, 16, 32, 16, 32, 32, 64, 8, 16, 16, 32, 16, 32, 32, 64, 16, 32, 32, 64, 32, 64, 64, 127, 4, 8, 8, 16, 8, 16, 16, 32, 8, 16
Offset: 0

Views

Author

Hans Havermann, May 26 2002

Keywords

Comments

Number of ON cells at generation n of 1-D CA defined by Rule 126, starting with a single ON cell. - N. J. A. Sloane, Aug 09 2014

Examples

			[Contribution from _Omar E. Pol_, Dec 11 2010] (Start)
May be arranged in blocks of sizes 1, 1, 2, 4, 8, 16, 32, ...:
1,
3,
4, 7,
4, 8, 8, 15,
4, 8, 8, 16, 8, 16, 16, 31,
4, 8, 8, 16, 8, 16, 16, 32, 8, 16, 16, 32, 16, 32, 32, 63,
Last terms of rows give positive terms of A000225.
(End)
		

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; Chapter 3.

Crossrefs

Programs

  • Mathematica
    a[n_] := 2^(DigitCount[n, 2, 1]+1) - Boole[IntegerQ[Log[2, n+1]]];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Oct 02 2018, from 2nd formula *)

Formula

a(2n) = a(n)+A036987(n); a(2n+1) = a(n)+2*2^A000120(n). - Benoit Cloitre, Sep 22 2003
a(n) = 2^(1+wt(n)) unless n is of the form 2^i-1 in which case we must subtract 1, where wt = A000120. - N. J. A. Sloane, Aug 09 2014
G.f.: 2*Product_{k>=0} (1+2*x^(2^k)) - Sum_{k>=0} x^(2^k-1). - N. J. A. Sloane, Aug 09 2014

A071050 Number of 0's in n-th row of triangle in A071035.

Original entry on oeis.org

0, 0, 1, 0, 5, 3, 5, 0, 13, 11, 13, 7, 17, 11, 13, 0, 29, 27, 29, 23, 33, 27, 29, 15, 41, 35, 37, 23, 41, 27, 29, 0, 61, 59, 61, 55, 65, 59, 61, 47, 73, 67, 69, 55, 73, 59, 61, 31, 89, 83, 85, 71, 89, 75, 77, 47, 97, 83, 85, 55, 89, 59, 61, 0, 125, 123, 125, 119
Offset: 0

Views

Author

Hans Havermann, May 26 2002

Keywords

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; Chapter 3.

A169699 Total number of ON cells at stage n of two-dimensional 5-neighbor outer totalistic cellular automaton defined by "Rule 510".

Original entry on oeis.org

1, 5, 12, 25, 28, 56, 56, 113, 60, 120, 120, 240, 120, 240, 240, 481, 124, 248, 248, 496, 248, 496, 496, 992, 248, 496, 496, 992, 496, 992, 992, 1985, 252, 504, 504, 1008, 504, 1008, 1008, 2016, 504, 1008, 1008, 2016, 1008, 2016, 2016, 4032, 504, 1008, 1008, 2016
Offset: 0

Views

Author

N. J. A. Sloane, Apr 17 2010

Keywords

Comments

We work on the square grid. Each cell has 4 neighbors, N, S, E, W. If none of your 4 neighbors are ON, your state does not change. If all 4 of your neighbors are ON, your state flips. In all other cases you turn ON. We start with one ON cell.
As observed by Packard and Wolfram (see Fig. 2), a slice along the E-W line shows the successive states of the 1-D CA Rule 126 (see A071035, A071051).

Examples

			When arranged into blocks of sizes 1,1,2,4,8,16,...:
1,
5,
12, 25,
28, 56, 56, 113,
60, 120, 120, 240, 120, 240, 240, 481,
124, 248, 248, 496, 248, 496, 496, 992, 248, 496, 496, 992, 496, 992, 992, 1985,
252, 504, 504, 1008, 504, 1008, 1008, 2016, 504, 1008, 1008, 2016, 1008, 2016, 2016, 4032, 504, 1008, 1008, 2016, 1008, 2016, 2016, 4032,
..., the initial terms in the rows (after the initial rows) have the form 2^m-4 and the final terms are given by A092440. The row beginning with 2^m-4 is divisible by 2^(m-2)-1 (see formula).
		

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 170.

Crossrefs

See A253089 for 9-celled neighborhood version.

Programs

  • Maple
    A000120 := proc(n) add(i,i=convert(n,base,2)) end:
    ht:=n->floor(log[2](n));
    f:=proc(n) local a,t1;
    if n=0 then 1 else
    a:=(2^(ht(n)+1)-1)*2^(1+A000120(n));
    if 2^log[2](n)=n then a:=a+1; fi; a; fi; end;
    [seq(f(n),n=0..65)]; # A169699
  • Mathematica
    Map[Function[Apply[Plus,Flatten[ #1]]], CellularAutomaton[{ 510, {2,{{0,2,0},{2,1,2},{0,2,0}}},{1,1}},{{{1}},0},100]]
    ArrayPlot /@ CellularAutomaton[{510, {2, {{0, 2, 0}, {2, 1, 2}, {0, 2, 0}}}, {1, 1}}, {{{1}}, 0}, 28]

Formula

For n>0, it is easy to show that if 2^k <= n < 2^(k+1) then a(n) =
(2^(k+1)-1)*2^(1+wt(n)), where wt is the binary weight A000120, except that if n is a power of 2 we must add 1 to the result.

Extensions

Entry revised with more precise definition, formula and additional information, N. J. A. Sloane, Aug 24 2014

A267365 Decimal representation of the n-th iteration of the "Rule 126" elementary cellular automaton starting with a single ON (black) cell.

Original entry on oeis.org

1, 7, 27, 127, 387, 1935, 6579, 32767, 98307, 491535, 1671219, 8356095, 25264899, 126324495, 429503283, 2147483647, 6442450947, 32212254735, 109521666099, 547608330495, 1655709893379, 8278549466895, 28147068187443, 140735340937215, 422218907713539
Offset: 0

Views

Author

Robert Price, Jan 13 2016

Keywords

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.

Crossrefs

Cf. A071035.

Programs

  • Mathematica
    rule=126; rows=20; ca=CellularAutomaton[rule,{{1},0},rows-1,{All,All}]; (* Start with single black cell *) catri=Table[Take[ca[[k]],{rows-k+1,rows+k-1}],{k,1,rows}]; (* Truncated list of each row *) Table[FromDigits[catri[[k]],2],{k,1,rows}]   (* Decimal Representation of Rows *)

A267366 Binary representation of the middle column of the "Rule 126" elementary cellular automaton starting with a single ON (black) cell.

Original entry on oeis.org

1, 11, 110, 1101, 11010, 110100, 1101000, 11010001, 110100010, 1101000100, 11010001000, 110100010000, 1101000100000, 11010001000000, 110100010000000, 1101000100000001, 11010001000000010, 110100010000000100, 1101000100000001000, 11010001000000010000
Offset: 0

Views

Author

Robert Price, Jan 13 2016

Keywords

Comments

The middle column itself is A036987. [Noticed by Dominik Koeppl, Oct 21 2022]

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.

Crossrefs

Cf. A267367 (decimal), A071035, A036987, A209229.

Programs

  • Mathematica
    rule=126; rows=20; ca=CellularAutomaton[rule,{{1},0},rows-1,{All,All}]; (* Start with single black cell *) catri=Table[Take[ca[[k]],{rows-k+1,rows+k-1}],{k,1,rows}]; (* Truncated list of each row *) mc=Table[catri[[k]][[k]],{k,1,rows}]; (* Keep only middle cell from each row *) Table[FromDigits[Take[mc,k]],{k,1,rows}]  (* Binary Representation of Middle Column *)

A267367 Decimal representation of the middle column of the "Rule 126" elementary cellular automaton starting with a single ON (black) cell.

Original entry on oeis.org

1, 3, 6, 13, 26, 52, 104, 209, 418, 836, 1672, 3344, 6688, 13376, 26752, 53505, 107010, 214020, 428040, 856080, 1712160, 3424320, 6848640, 13697280, 27394560, 54789120, 109578240, 219156480, 438312960, 876625920, 1753251840, 3506503681, 7013007362
Offset: 0

Views

Author

Robert Price, Jan 13 2016

Keywords

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.

Crossrefs

Cf. A267366 (binary), A001855, A071035, A267365.

Programs

  • Maple
    A267367 := proc(n) local i, s, z; s := 0; i := n; z := 1;
    while 0 <= i do s := s+2^i; i := i-z; z := z+z od; s end:
    seq(A267367(n), n=0..32); # Peter Luschny, Dec 02 2017
  • Mathematica
    rule=126; rows=20; ca=CellularAutomaton[rule,{{1},0},rows-1,{All,All}]; (* Start with single black cell *) catri=Table[Take[ca[[k]],{rows-k+1,rows+k-1}],{k,1,rows}]; (* Truncated list of each row *) mc=Table[catri[[k]][[k]],{k,1,rows}]; (* Keep only middle cell from each row *) Table[FromDigits[Take[mc,k],2],{k,1,rows}]  (* Binary Representation of Middle Column *)
  • Python
    def A267367(n):
        i, s, z = n, 0, 1
        while 0 <= i: s += 1<A267367(n) for n in range(33)]) # Peter Luschny, Dec 02 2017

A267364 Binary representation of the n-th iteration of the "Rule 126" elementary cellular automaton starting with a single ON (black) cell.

Original entry on oeis.org

1, 111, 11011, 1111111, 110000011, 11110001111, 1100110110011, 111111111111111, 11000000000000011, 1111000000000001111, 110011000000000110011, 11111111000000011111111, 1100000011000001100000011, 111100001111000111100001111, 11001100110011011001100110011
Offset: 0

Views

Author

Robert Price, Jan 13 2016

Keywords

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.

Crossrefs

Cf. A071035.

Programs

  • Mathematica
    rule=126; rows=20; ca=CellularAutomaton[rule,{{1},0},rows-1,{All,All}]; (* Start with single black cell *) catri=Table[Take[ca[[k]],{rows-k+1,rows+k-1}],{k,1,rows}]; (* Truncated list of each row *) Table[FromDigits[catri[[k]]],{k,1,rows}]   (* Binary Representation of Rows *)

A267368 Total number of ON (black) cells after n iterations of the "Rule 126" elementary cellular automaton starting with a single ON (black) cell.

Original entry on oeis.org

1, 4, 8, 15, 19, 27, 35, 50, 54, 62, 70, 86, 94, 110, 126, 157, 161, 169, 177, 193, 201, 217, 233, 265, 273, 289, 305, 337, 353, 385, 417, 480, 484, 492, 500, 516, 524, 540, 556, 588, 596, 612, 628, 660, 676, 708, 740, 804, 812, 828, 844, 876, 892, 924, 956
Offset: 0

Views

Author

Robert Price, Jan 13 2016

Keywords

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.

Crossrefs

Cf. A071035.

Programs

  • Mathematica
    rule=126; rows=20; ca=CellularAutomaton[rule,{{1},0},rows-1,{All,All}]; (* Start with single black cell *) catri=Table[Take[ca[[k]],{rows-k+1,rows+k-1}],{k,1,rows}]; (* Truncated list of each row *) nbc=Table[Total[catri[[k]]],{k,1,rows}]; (* Number of Black cells in stage n *) Table[Total[Take[nbc,k]],{k,1,rows}] (* Number of Black cells through stage n *)

A267369 Total number of OFF (white) cells after n iterations of the "Rule 126" elementary cellular automaton starting with a single ON (black) cell.

Original entry on oeis.org

0, 0, 1, 1, 6, 9, 14, 14, 27, 38, 51, 58, 75, 86, 99, 99, 128, 155, 184, 207, 240, 267, 296, 311, 352, 387, 424, 447, 488, 515, 544, 544, 605, 664, 725, 780, 845, 904, 965, 1012, 1085, 1152, 1221, 1276, 1349, 1408, 1469, 1500, 1589, 1672, 1757, 1828, 1917
Offset: 0

Views

Author

Robert Price, Jan 13 2016

Keywords

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.

Crossrefs

Cf. A071035.

Programs

  • Mathematica
    rule=126; rows=20; ca=CellularAutomaton[rule,{{1},0},rows-1,{All,All}]; (* Start with single black cell *) catri=Table[Take[ca[[k]],{rows-k+1,rows+k-1}],{k,1,rows}]; (* Truncated list of each row *) nbc=Table[Total[catri[[k]]],{k,1,rows}]; (* Number of Black cells in stage n *) nwc=Table[Length[catri[[k]]]-nbc[[k]],{k,1,rows}]; (* Number of White cells in stage n *) Table[Total[Take[nwc,k]],{k,1,rows}] (* Number of White cells through stage n *)
Showing 1-9 of 9 results.