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.

Previous Showing 11-20 of 24 results. Next

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

Original entry on oeis.org

1, 6, 6, 20, 6, 36, 20, 88, 6, 36, 36, 120, 20, 120, 88, 336, 6, 36, 36, 120, 36, 216, 120, 528, 20, 120, 120, 400, 88, 528, 336, 1376, 6, 36, 36, 120, 36, 216, 120, 528, 36, 216, 216, 720, 120, 720, 528, 2016, 20, 120, 120, 400, 120, 720, 400, 1760, 88, 528, 528, 1760, 336, 2016, 1376, 5440
Offset: 0

Views

Author

N. J. A. Sloane, Aug 21 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 077 (see Ekhad-Sloane-Zeilberger "Odd-Rule Cellular Automata on the Square Grid" link).
Run Length Transform of A246036.
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]
[0, 0, 0]
[X, X, X]
which contains a(1) = 6 ON cells.
		

Crossrefs

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

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+y);
    OddCA(f, 70);
  • Mathematica
    (* f = A246036 *) f[0] = 1; f[n_] := (4^(n+1)-(-2)^n)/3; Table[Times @@ (f[Length[#]]&) /@ Select[s = Split[IntegerDigits[n, 2]], #[[1]] == 1&], {n, 0, 63}] (* Jean-François Alcover, Jul 12 2017 *)

A269522 Number of active (ON, black) cells in n-th stage of growth of two-dimensional cellular automaton defined by "Rule 622", based on the 5-celled von Neumann neighborhood.

Original entry on oeis.org

1, 5, 9, 21, 25, 37, 57, 69, 89, 101, 121, 133, 169, 205, 257, 309, 361, 333, 377, 381, 385, 461, 465, 509, 601, 653, 697, 781, 889, 845, 1097, 1077, 1353, 1205, 1305, 1349, 1345, 1357, 1321, 1437, 1553, 1589, 1601, 1709, 1729, 1813, 1937, 2069, 2361, 2181
Offset: 0

Views

Author

Robert Price, Feb 28 2016

Keywords

Comments

Initialized with a single black (ON) cell at stage zero.

References

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

Crossrefs

Programs

  • Mathematica
    rule=622; stages=300; ca=CellularAutomaton[ {rule,{2,{{0,2,0},{2,1,2},{0,2,0}}},{1,1}}, {{{1}},0}, stages]; (* Start with single black cell *) Map[Function[Apply[Plus,Flatten[#1]]],ca] (* Count ON cells at each stage *)

A253090 Number of ON cells at generation n of 9-celled totalistic CA defined by Rule 614.

Original entry on oeis.org

1, 9, 8, 32, 16, 88, 16, 104, 16, 136, 72, 312, 56, 360, 76, 468, 76, 444, 156, 708, 152, 928, 164, 996, 156, 924, 292, 1316, 256, 1520, 348, 1676, 304, 1768, 400, 1928, 408, 2040, 524, 2628, 516, 2684, 688, 3272, 744, 3872, 684, 3692, 756, 3724, 840, 4080
Offset: 0

Views

Author

N. J. A. Sloane, Feb 12 2015

Keywords

Comments

A cell turns ON at generation n iff it was OFF at generation n-1 and exactly 1 or 3 of its 8 neighbors were ON, or if it was ON and exactly 0, 2 or 4 of its 8 neighbors were ON.
Note that although A072272 is an "odd-rule" CA, this one is not.

Crossrefs

Cf. A072272 (5-neighbor analog).

Programs

  • Mathematica
    Map[Function[Apply[Plus, Flatten[#1]]],
    CellularAutomaton[{614, {2, {{2, 2, 2}, {2, 1, 2}, {2, 2, 2}}}, {1, 1}}, {{{1}}, 0}, 66]]
    ArrayPlot /@ CellularAutomaton[{614, {2, {{2, 2, 2}, {2, 1, 2}, {2, 2, 2}}}, {1, 1}}, {{{1}}, 0}, 15]

Formula

It would be nice to have a recurrence.

A138277 Total number of active nodes of the Rule 150 cellular automaton on an infinite Bethe lattice with coordination number 4 (with a single 1 as initial condition).

Original entry on oeis.org

1, 5, 13, 49, 109, 473, 1081, 4037, 8749, 37913, 88465, 325021, 717337, 3108461, 7095613, 26490289, 57395629, 248714393, 580333585, 2132141341, 4707150193, 20397650837, 46548642709, 173816036825, 376630110937, 1632063814061, 3808148899477, 13991111158153
Offset: 0

Views

Author

Jens Christian Claussen (claussen(AT)theo-physik.uni-kiel.de), Mar 11 2008

Keywords

Comments

See A138276 for the corresponding sequence for a Bethe lattice with coordination number 3.
See A001045 for the corresponding sequence on a 1D lattice (equivalent to a k=2 Bethe lattice); this is based on the Jacobsthal sequence A001045.
See A072272 for the corresponding sequence on a 2D lattice (based on A007483).
Related to Cellular Automata.

Examples

			Let x_0 be the state (0 or 1) of the focal node and x_i the state of every node that is i steps away from the focal node. In time step n=0, all x_i=0 except x_0=1 (start with a single seed). In the next step, x_1=1 as they have 1 neighbor being 1. For n=2, the x_1 nodes have 1 neighbor being 1 (x_0) and themselves being 1; the sum being 2, modulo 2, resulting in x_1=0.
The focal node and outmost nodes x_n are always 1.
Thus one has the patterns
x_0, x_1, x_2, ...
1
1 1
1 0 1
1 0 1 1
1 0 0 0 1
1 1 0 1 1 1
1 0 0 0 1 0 1
1 1 0 1 1 0 1 1
1 0 0 0 0 0 0 0 1
(N.B.: This is equivalent to the right half plane of Rule 150 in 1D.)
The nodes have the multiplicities 1,4,12,36,108,324,972,...
The sequence then is obtained by
a(n)= x_0(n) + 4*(x_1(n) + sum_(i=2...n) x_i(n) * 3^(i-1)).
		

Crossrefs

Programs

  • Mathematica
    nmax = 30;
    states = CellularAutomaton[150, {{1}, 0}, nmax];
    T[n_, i_] := states[[n+1, nmax+i+1]];
    a[n_] := T[n, 0] + 4(T[n, 1]+Sum[3^(i-1) T[n, i], {i, 2, n}]);
    Table[a[n], {n, 0, nmax}] (* Jean-François Alcover, Aug 20 2018 *)

Formula

The total number of nodes in state 1 after n iterations (starting with a single 1) of the Rule 150 cellular automaton on an infinite Bethe lattice with coordination number 4. Rule 150 sums the values of the focal node and its k neighbors, then applies modulo 2.

Extensions

a(9)-a(27) from Alois P. Heinz, Jun 28 2015

A165345 Number of ON cells after n generations of the 2D cellular automaton described in the comments.

Original entry on oeis.org

1, 5, 9, 25, 29, 41, 53, 105, 113, 129, 141, 193, 205, 241, 285, 433, 453, 481, 497, 553, 569, 609, 653, 801, 829, 881, 917, 1073, 1109, 1217, 1349, 1793, 1845, 1905, 1933, 2001, 2029, 2081, 2129, 2281, 2313, 2369, 2409, 2569, 2609, 2721, 2853, 3297, 3357
Offset: 1

Views

Author

John W. Layman, Sep 15 2009, Sep 16 2009

Keywords

Comments

The cells are the squares of the standard square grid. All cells are initially OFF and one cell is turned ON at generation 1. At subsequent generations a cell is ON if and only if (1) it was ON, or (2) exactly one of the four nearest side neighbors was ON, or (3) exactly three of the four nearest corner neighbors were ON, in the previous generation
The equivalent Mathematica automaton is obtained with neighborhood weights {{10,2,10},{2,1,2},{10,2,10}}, rule number 755364134566574, and initial configuration {{1}} (see code).

Crossrefs

Programs

  • Mathematica
    RasterGraphics[state_?MatrixQ, colors_Integer:2, opts___]:= Graphics[Raster[ Reverse[1 -state/(colors -1)]],AspectRatio-> (AspectRatio /.{opts} /.AspectRatio-> Automatic),Frame-> True, FrameTicks ->none,GridLines->none]; wt = {{10, 2, 10}, {2, 1, 2}, {10, 2, 10}}; rule=755364134566574; init = {{1}}; Show[GraphicsArray[ Map[RasterGraphics, CellularAutomaton[{rule, {2, wt}, {1, 1}}, {init, 0}, 9, -10]]]]; ca = CellularAutomaton[{rule, {2, wt}, {1, 1}}, {init, 0}, 99, -100]; a = Table[Total[ca[[i]], 2], {i, 1, 100}]

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

Original entry on oeis.org

1, 7, 7, 29, 7, 49, 29, 103, 7, 49, 49, 203, 29, 203, 103, 373, 7, 49, 49, 203, 49, 343, 203, 721, 29, 203, 203, 841, 103, 721, 373, 1407, 7, 49, 49, 203, 49, 343, 203, 721, 49, 343, 343, 1421, 203, 1421, 721, 2611, 29, 203, 203, 841, 203, 1421, 841, 2987, 103, 721, 721, 2987, 373, 2611, 1407, 5277
Offset: 0

Views

Author

N. J. A. Sloane, Aug 21 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 575 (see Ekhad-Sloane-Zeilberger "Odd-Rule Cellular Automata on the Square Grid" link).
Run Length Transform of A246038.
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]
[0, X, 0]
[X, X, X]
which contains a(1) = 7 ON cells.
		

Crossrefs

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

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+y)+1 mod 2;
    OddCA(f, 70);
  • Mathematica
    (* f = A246038 *) f[0]=1; f[1]=7; f[2]=29; f[3]=103; f[4]=373; f[n_] := f[n] = 8 f[n-4] + 8 f[n-3] + 3 f[n-1]; Table[Times @@ (f[Length[#]]&) /@ Select[Split[IntegerDigits[n, 2]], #[[1]] == 1&], {n, 0, 63}] (* Jean-François Alcover, Jul 12 2017 *)

A246314 Number of odd terms in f^n, where f = 1/x^2+1/x+1+x+x^2+1/y^2+1/y+y+y^2.

Original entry on oeis.org

1, 9, 9, 37, 9, 65, 37, 157, 9, 81, 65, 237, 37, 293, 157, 713, 9, 81, 81, 333, 65, 473, 237, 1077, 37, 333, 293, 1129, 157, 1285, 713, 2737, 9, 81, 81, 333, 81, 585, 333, 1413, 65, 585, 473, 1733, 237, 1933, 1077, 4337, 37, 333, 333, 1369, 293, 2125, 1129, 4969, 157, 1413, 1285, 5041, 713, 5561, 2737, 11421, 9, 81
Offset: 0

Views

Author

N. J. A. Sloane, Aug 26 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 (a cross containing 9 cells), 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:
[0, 0, X, 0, 0]
[0, 0, X, 0, 0]
[X, X, X, X, X]
[0, 0, X, 0, 0]
[0, 0, X, 0, 0]
which contains a(1) = 9 ON cells.
The second and third generations are:
[0, 0, 0, 0, X, 0, 0, 0, 0]
[0, 0, 0, 0, 0, 0, 0, 0, 0]
[0, 0, 0, 0, X, 0, 0, 0, 0]
[0, 0, 0, 0, 0, 0, 0, 0, 0]
[X, 0, X, 0, X, 0, X, 0, X]  (again with 9 ON cells)
[0, 0, 0, 0, 0, 0, 0, 0, 0]
[0, 0, 0, 0, X, 0, 0, 0, 0]
[0, 0, 0, 0, 0, 0, 0, 0, 0]
[0, 0, 0, 0, X, 0, 0, 0, 0]
[0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0, 0]
[0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0, 0]
[0, 0, 0, 0, X, X, 0, X, X, 0, 0, 0, 0]
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[0, 0, X, 0, 0, X, X, X, 0, 0, X, 0, 0]
[0, 0, X, 0, X, 0, 0, 0, X, 0, X, 0, 0]
[X, X, 0, 0, X, 0, X, 0, X, 0, 0, X, X] (with 37 ON cells)
[0, 0, X, 0, X, 0, 0, 0, X, 0, X, 0, 0]
[0, 0, X, 0, 0, X, X, X, 0, 0, X, 0, 0]
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[0, 0, 0, 0, X, X, 0, X, X, 0, 0, 0, 0]
[0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0, 0]
[0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0, 0]
The terms can be arranged into blocks of sizes 1,1,2,4,8,16,32,...:
1,
9,
9, 37,
9, 65, 37, 157,
9, 81, 65, 237, 37, 293, 157, 713,
9, 81, 81, 333, 65, 473, 237, 1077, 37, 333, 293, 1129, 157, 1285, 713, 2737,
9, 81, 81, 333, 81, 585, 333, 1413, 65, 585, 473, 1733, 237, 1933, 1077, 4337, 37, 333, 333, 1369, 293, 2125, 1129, 4969, 157, 1413, 1285, 5041, 713, 5561, 2737, 11421, ...
The final terms in the rows are A246315.
		

Crossrefs

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

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^2+1/x+1+x+x^2+1/y^2+1/y+y+y^2;
    OddCA(f, 70);
  • Mathematica
    c[f_] := f /. {x -> 1, y -> 1};
    OddCA[f_, M_] := Module[{a = {}, f2, p = 1}, f2 = PolynomialMod[f, 2]; Do[ AppendTo[a, c[p]]; Print[a]; p = PolynomialMod[p f2, 2], {n, 0, M}]; a];
    f = 1/x^2 + 1/x + 1 + x + x^2 + 1/y^2 + 1/y + y + y^2;
    OddCA[f, 70] (* Jean-François Alcover, May 24 2020, after Maple *)

Formula

The values of a(n) for n in A247647 (or A247648) determine all the values, as follows. Parse the binary expansion of n into terms from A247647 separated by at least two zeros: m_1 0...0 m_2 0...0 m_3 ... m_r 0...0. Ignore any number (one or more) of trailing zeros. Then a(n) = a(m_1)*a(m_2)*...*a(m_r). For example, n = 37_10 = 100101_2 is parsed into 1.00.101, and so a(37) = a(1)*a(5) = 9*65 = 585. This is a generalization of the Run Length Transform.

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

Original entry on oeis.org

1, 6, 6, 22, 6, 36, 22, 82, 6, 36, 36, 132, 22, 132, 82, 302, 6, 36, 36, 132, 36, 216, 132, 492, 22, 132, 132, 484, 82, 492, 302, 1106, 6, 36, 36, 132, 36, 216, 132, 492, 36, 216, 216, 792, 132, 792, 492, 1812, 22, 132, 132, 484, 132, 792, 484, 1804, 82, 492, 492, 1804, 302, 1812, 1106, 4066
Offset: 0

Views

Author

N. J. A. Sloane, Jan 29 2015

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 175 (see Ekhad-Sloane-Zeilberger "Odd-Rule Cellular Automata on the Square Grid" link).

Examples

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

Crossrefs

Other CA's that use the same rule but with different cell neighborhoods: A160239, A102376, A071053, A072272, A001316, A246034, A246035, A253064, A253065, A253066.
Cf. A253070.

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+x/y+y/x+x*y;
    OddCA(f, 130);
  • Mathematica
    (* f = A253070 *) f[0]=1; f[1]=6; f[2]=22; f[3]=82; f[4]=302; f[5]=1106;f[6]=4066; f[n_] := f[n] = 8 f[n-4] + 8 f[n-3] + 3 f[n-1]; Table[Times @@ (f[Length[#]]&) /@ Select[Split[IntegerDigits[n, 2]], #[[1]] == 1&], {n, 0, 63}] (* Jean-François Alcover, Jul 12 2017 *)

Formula

This is the Run Length Transform of A253070.

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

Original entry on oeis.org

1, 7, 7, 21, 7, 49, 21, 95, 7, 49, 49, 147, 21, 147, 95, 333, 7, 49, 49, 147, 49, 343, 147, 665, 21, 147, 147, 441, 95, 665, 333, 1319, 7, 49, 49, 147, 49, 343, 147, 665, 49, 343, 343, 1029, 147, 1029, 665, 2331, 21, 147, 147, 441, 147, 1029, 441, 1995, 95, 665, 665, 1995, 333, 2331, 1319, 4837
Offset: 0

Views

Author

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 357 (see Ekhad-Sloane-Zeilberger "Odd-Rule Cellular Automata on the Square Grid" link).

Examples

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

Crossrefs

Other CA's that use the same rule but with different cell neighborhoods: A160239, A102376, A071053, A072272, A001316, A246034, A246035, A253064, A253065, A253066, A252069.
Cf. A253072.

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*y)+1/x+1/y+y+x/y+x+x*y;
    OddCA(f, 130);
  • Mathematica
    (* f = A253072 *) f[0]=1; f[1]=7; f[2]=21; f[3]=95; f[4]=333; f[5]=1319; f[n_] := f[n] = -8 f[n-5] + 44 f[n-4] - 24 f[n-3] - 5 f[n-2] + 6 f[n-1]; Table[Times @@ (f[Length[#]]&) /@ Select[Split[IntegerDigits[n, 2]], #[[1]] == 1&], {n, 0, 63}] (* Jean-François Alcover, Jul 12 2017 *)

Formula

This is the Run Length Transform of A253072.

A255291 Number of 1's in expansion of F^n mod 3, where F = 1/x+1+x+1/y+y.

Original entry on oeis.org

1, 5, 4, 5, 25, 12, 4, 20, 69, 5, 25, 20, 25, 125, 52, 12, 60, 281, 4, 20, 97, 20, 100, 353, 69, 345, 448, 5, 25, 20, 25, 125, 60, 20, 100, 345, 25, 125, 100, 125, 625, 252, 52, 260, 1341, 12, 60, 381, 60, 300, 1413, 281, 1405
Offset: 0

Views

Author

N. J. A. Sloane, Feb 21 2015

Keywords

Comments

A255291 and A255292 together are a mod 3 analog of A072272.

Examples

			The pairs [no. of 1's, no. of 2's] are [1, 0], [5, 0], [4, 9], [5, 0], [25, 0], [12, 37], [4, 9], [20, 45], [69, 44], [5, 0], [25, 0], [20, 45], [25, 0], [125, 0], [52, 177], [12, 37], [60, 185], [281, 156], [4, 9], [20, 45], [97, 72], [20, 45], [100, 225], [353, 228], [69, 44], [345, 220], [448, 573], [5, 0], [25, 0], [20, 45], ...
		

Crossrefs

Programs

  • Maple
    # C3 Counts 1's and 2's
    C3 := proc(f) local c,ix,iy,f2,i,t1,t2,n1,n2;
    f2:=expand(f) mod 3; n1:=0; n2:=0;
    if whattype(f2) = `+` then
    t1:=nops(f2);
    for i from 1 to t1 do t2:=op(i, f2); ix:=degree(t2, x); iy:=degree(t2, y);
    c:=coeff(coeff(t2,x,ix),y,iy);
    if (c mod 3) = 1 then n1:=n1+1; else n2:=n2+1; fi; od: RETURN([n1,n2]);
    else ix:=degree(f2, x); iy:=degree(f2, y);
    c:=coeff(coeff(f2,x,ix),y,iy);
    if (c mod 3) = 1 then n1:=n1+1; else n2:=n2+1; fi; RETURN([n1,n2]);
    fi;
    end;
    F3:=1/x+1+x+1/y+y mod 3;
    g:=(F,n)->expand(F^n) mod 3;
    [seq(C3(g(F3,n))[1],n=0..60)];
Previous Showing 11-20 of 24 results. Next