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 14 results. Next

A327972 Bitwise XOR of trajectories of rule 30 and rule 150, when both are started from a lone 1 cell: a(n) = A110240(n) XOR A038184(n).

Original entry on oeis.org

0, 0, 12, 4, 128, 384, 3404, 740, 37056, 127296, 794316, 286532, 8510656, 25560896, 224057484, 42076324, 2446214016, 8430013568, 51732969356, 18062215300, 553213409792, 1655549411840, 14630859361996, 3227756349540, 159219183713088, 546944274202816, 3411332163636556, 1231354981057220, 36554500089286208, 109782277571646400, 962314238681316620
Offset: 0

Views

Author

Antti Karttunen, Oct 03 2019

Keywords

Crossrefs

Cf. also A327971, A327973, A327976, A328103, A328104 for other such combinations.

Programs

Formula

a(n) = A038184(n) XOR A110240(n).
Conjecture: for n > 1, floor(log_2(a(n))) = 2*n - (1,2,1,4,1,2,1,5 according as n == 0..7 (mod 8), respectively). - Alan Michael Gómez Calderón, Mar 02 2023

A071053 Number of ON cells at n-th generation of 1-D CA defined by Rule 150, starting with a single ON cell at generation 0.

Original entry on oeis.org

1, 3, 3, 5, 3, 9, 5, 11, 3, 9, 9, 15, 5, 15, 11, 21, 3, 9, 9, 15, 9, 27, 15, 33, 5, 15, 15, 25, 11, 33, 21, 43, 3, 9, 9, 15, 9, 27, 15, 33, 9, 27, 27, 45, 15, 45, 33, 63, 5, 15, 15, 25, 15, 45, 25, 55, 11, 33, 33, 55, 21, 63, 43, 85, 3, 9, 9, 15, 9, 27, 15, 33, 9, 27, 27
Offset: 0

Views

Author

Hans Havermann, May 26 2002

Keywords

Comments

Number of 1's in n-th row of triangle in A071036.
Number of odd coefficients in (x^2+x+1)^n. - Benoit Cloitre, Sep 05 2003. This result was given in Wolfram (1983). - N. J. A. Sloane, Feb 17 2015
This is also the odd-rule cellular automaton defined by OddRule 007 (see Ekhad-Sloane-Zeilberger "Odd-Rule Cellular Automata on the Square Grid" link). - N. J. A. Sloane, Feb 25 2015
This is the Run Length Transform of S(n) = Jacobsthal(n+2) (cf. A001045). 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). - N. J. A. Sloane, Sep 05 2014

Examples

			May be arranged into blocks of sizes 1,1,2,4,8,16,...:
1,
3,
3, 5,
3, 9, 5, 11,
3, 9, 9, 15, 5, 15, 11, 21,
3, 9, 9, 15, 9, 27, 15, 33, 5, 15, 15, 25, 11, 33, 21, 43,
3, 9, 9, 15, 9, 27, 15, 33, 9, 27, 27, 45, 15, 45, 33, 63, 5, 15, 15, 25, 15, 45, 25, 55, 11, 33, 33, 55, 21, 63, 43, 85,
3, 9, 9, 15, 9, 27, 15, 33, 9, 27, 27, ...
... - _N. J. A. Sloane_, Sep 05 2014
.
From _Omar E. Pol_, Mar 15 2015: (Start)
Apart from the initial 1, the sequence can be written also as an irregular tetrahedron T(s,r,k) = A001045(r+2) * a(k), s>=1, 1<=r<=s, 0<=k<=(A011782(s-r)-1) as shown below (see also _Joerg Arndt_'s equivalent program):
3;
..
3;
5;
.......
3,   9;
5;
11;
...............
3,   9,  9, 15;
5,  15;
11;
21;
...............................
3,   9,  9, 15,  9, 27, 15, 33;
5,  15, 15, 25;
11, 33;
21;
43;
..............................................................
3,   9,  9, 15,  9, 27, 15, 33, 9, 27, 27, 45, 15, 45, 33, 63;
5,  15, 15, 25, 15, 45, 25, 55;
11, 33, 33, 55;
21, 63;
43;
85;
...
Note that every row r is equal to A001045(r+2) times the beginning of the sequence itself, thus in 3D every column contains the same number.
(End)
		

References

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

Crossrefs

Programs

  • Mathematica
    a[n_] := Total[CoefficientList[(x^2 + x + 1)^n, x, Modulus -> 2]];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Aug 05 2018 *)
  • PARI
    b(n) = { (2^n - (-1)^n) / 3; }  \\ A001045
    a(n)=
    {
        if ( n==0, return(1) );
        \\ Use  a( 2^k * t ) = a(t)
        n \= 2^valuation(n,2);
        if ( n==1, return(3) );  \\ Use a(2^k) == 3
        \\ now n is odd
        my ( v1 = valuation(n+1, 2) );
        \\ Use a( 2^k - 1 ) = A001045( 2 + k ):
        if ( n == 2^v1 - 1 ,  return( b( v1 + 2 ) ) );
        my( k2 = 1, k = 0 );
        while ( k2 < n,  k2 <<= 1; k+=1 );
        if ( k2 > n, k2 >>= 1; k-=1 );
        my( t = n - k2 );
        \\ here  n == 2^k + 1 where k maximal
        \\ Use the following:
        \\ a( 2^k + t ) =  3 * a(t)  if  t <= 2^(k-1)
        \\ a( 2^k + 2^(k-1) + t ) =  5 * a(t)  if  t <= 2^(k-2)
        \\ a( 2^k + 2^(k-1) + 2^(k-2) + t ) =  11* a(t)  if  t <= 2^(k-3)
        \\  ... etc. ...
        \\ a( 2^k + ... + 2^(k-s) + t ) = A001045(s+2) * a(t)  if  t <= 2^((k-1)-s)
        my ( s=1 );
        while ( 1 ,
            k2 >>= 1;
            if ( t <= k2 ,  return(  b(s+2) * a(t) ) );
            t -= k2;
            s += 1;
        );
    }
    \\ Joerg Arndt, Mar 15 2015, from SeqFan Mailing List, Mar 09 2015

Formula

a(n) = Product_{i in row n of A245562} A001045(i+2) [Sillke]. For example, a(11) = A001045(3)*A001045(4) = 3*5 = 15. - N. J. A. Sloane, Aug 10 2014
Floor((a(n)-1)/4) mod 2 = A020987(n). - Ralf Stephan, Mar 18 2004
a(2*n) = a(n); a(2*n+1) = a(n) + 2*a(floor(n/2)). - Peter J. Taylor, Mar 26 2020
Sum_{k = 0..2^n-1} a(k) = A087206(n). - Linhua Zou, Jun 13 2025

Extensions

Entry revised by N. J. A. Sloane, Aug 13 2014

A038183 One-dimensional cellular automaton 'sigma-minus' (Rule 90): 000,001,010,011,100,101,110,111 -> 0,1,0,1,1,0,1,0.

Original entry on oeis.org

1, 5, 17, 85, 257, 1285, 4369, 21845, 65537, 327685, 1114129, 5570645, 16843009, 84215045, 286331153, 1431655765, 4294967297, 21474836485, 73014444049, 365072220245, 1103806595329, 5519032976645, 18764712120593, 93823560602965, 281479271743489, 1407396358717445
Offset: 0

Views

Author

Antti Karttunen, Feb 09 1999

Keywords

Comments

Generation n (starting from the generation 0: 1) interpreted as a binary number.
Observation: for n <= 15, a(n) = smallest number whose Euler totient is divisible by 4^n. This is not true for n = 16. - Arkadiusz Wesolowski, Jul 29 2012
Orbit of 1 under iteration of Rule 90 = A048725 = (n -> n XOR 4n). - M. F. Hasler, Oct 09 2017

Examples

			Successive states are:
          1
         101
        10001
       1010101
      100000001
     10100000101
    1000100010001
   101010101010101
  10000000000000001
  ...
which when converted from binary to decimal give the sequence. - _N. J. A. Sloane_, Jul 21 2014
		

Crossrefs

Cf. A006977, A006978, A038184, A038185 (other cellular automata), A000215 (Fermat numbers).
Also alternate terms of A001317. Cf. A048710, A048720, A048757 (same 0/1-patterns interpreted in Fibonacci number system).
Equals 4*A089893(n)+1.
For right half of triangle (excluding the middle bit) see A245191.
Cf. Sierpiński's gasket, A047999.

Programs

  • Maple
    bit_n := (x,n) -> `mod`(floor(x/(2^n)),2);
    # A recursive, cellular automaton rule version:
    sigmaminus := proc(n) option remember: if (0 = n) then (1)
    else sum('((bit_n(sigmaminus(n-1),i)+bit_n(sigmaminus(n-1),i-2)) mod 2)*(2^i)', 'i'=0..(2*n)) fi: end:
  • Mathematica
    r = 24; c = CellularAutomaton[90, {{1}, 0}, r - 1]; Table[FromDigits[c[[k, r - k + 1 ;; r + k - 1]], 2], {k, r}] (* Arkadiusz Wesolowski, Jun 09 2013 *)
    a[ n_] := Sum[ 4^(n - k) Mod[Binomial[2 n, 2 k], 2], {k, 0, n}]; (* Michael Somos, Jun 30 2018 *)
    a[ n_] := If[ n < 0, 0, Product[ BitGet[n, k] (2^(2^(k + 1))) + 1, {k, 0, n}]]; (* Michael Somos, Jun 30 2018 *)
  • PARI
    vector(100,i,a=if(i>1,bitxor(a<<2,a),1)) \\ M. F. Hasler, Oct 09 2017
    
  • PARI
    {a(n) = sum(k=0, n, binomial(2*n, 2*k)%2 * 4^(n-k))}; /* Michael Somos, Jun 30 2018 */
  • Python
    a=1
    for n in range(55):
        print(a, end=",")
        a ^= a*4
    # Alex Ratushnyak, May 04 2012
    
  • Python
    def A038183(n): return sum((bool(~(m:=n<<1)&m-k)^1)<Chai Wah Wu, May 02 2023
    

Formula

a(n) = Product_{i>=0} bit_n(n, i)*(2^(2^(i+1)))+1: A direct algebraic formula!
a(n) = Sum_{k=0..n} (C(2*n, 2*k) mod 2)*4^(n-k). - Paul Barry, Jan 03 2005
a(2*n+1) = 5*a(2n); a(n+1) = a(n) XOR 4*a(n) where XOR is binary exclusive OR operator. - Philippe Deléham, Jun 18 2005
a(n) = A001317(2n). - Alex Ratushnyak, May 04 2012

A048723 Binary "exponentiation" without carries: {0..y}^{0..x}, where y (column index) is binary encoding of GF(2)-polynomial and x (row index) is the exponent.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 4, 3, 1, 0, 1, 8, 5, 4, 1, 0, 1, 16, 15, 16, 5, 1, 0, 1, 32, 17, 64, 17, 6, 1, 0, 1, 64, 51, 256, 85, 20, 7, 1, 0, 1, 128, 85, 1024, 257, 120, 21, 8, 1, 0, 1, 256, 255, 4096, 1285, 272, 107, 64, 9, 1
Offset: 0

Views

Author

Antti Karttunen, Apr 26 1999

Keywords

Examples

			1 0 0 0 0 0 0 0 0 ...
1 1 1 1 1 1 1 1 1 ...
1 2 4 8 16 32 64 128 256 ...
1 3 5 15 17 51 85 255 257 ...
1 4 16 64 256 1024 4096 16384 65536 ...
		

Crossrefs

Cf. ordinary power table A004248 and A034369, A034373.
Cf. A048710. Row 3: A001317, Row 5: A038183 (bisection of row 3), Row 7: A038184. Column 2: A000695, diagonal of A048720.
Main diagonal: A048731.

Programs

  • Maple
    # Xmult and trinv have been given in A048720.
    Xpower := proc(nn,mm) option remember; if(0 = mm) then RETURN(1); # By definition, also 0^0 = 1. else RETURN(Xmult(nn,Xpower(nn,mm-1))); fi; end;
  • Mathematica
    trinv[n_] := Floor[(1 + Sqrt[1 + 8*n])/2];
    Xmult[nn_, mm_] := Module[{n = nn, m = mm, s = 0}, While[n > 0, If[1 == Mod[n, 2], s = BitXor[s, m]]; n = Floor[n/2]; m = m*2]; s];
    Xpower[nn_, mm_] := Xpower[nn, mm] = If[0 == mm, 1, Xmult[nn, Xpower[nn, mm - 1]]];
    a[n_] := Xpower[n - (trinv[n]*(trinv[n] - 1))/2, (trinv[n] - 1)*((1/2)* trinv[n] + 1) - n];
    Table[a[n], {n, 0, 65}] (* Jean-François Alcover, Mar 04 2016, adapted from Maple *)

Formula

a(n) = Xpower( (n-((trinv(n)*(trinv(n)-1))/2)), (((trinv(n)-1)*(((1/2)*trinv(n))+1))-n) );

A071036 Triangle read by rows giving successive states of cellular automaton generated by "Rule 150" when started with a single ON cell.

Original entry on oeis.org

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

Views

Author

Hans Havermann, May 26 2002

Keywords

Comments

Row n has length 2n+1.
Also the coefficients of (x^2 + x + 1)^n mod 2. - Alan DenAdel, Mar 19 2014
The number of 0's in row n is A071052(n), and the number of 1's in row n is A071053(n). - Michael Somos, Jun 24 2018

Examples

			Triangle begins:
               1;
            1, 1, 1;
         1, 0, 1, 0, 1;
      1, 1, 0, 1, 0, 1, 1;
   1, 0, 0, 0, 1, 0, 0, 0, 1;
1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1;
... - _Michel Marcus_, Mar 20 2014
		

References

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

Crossrefs

This sequence, A038184 and A118110 are equivalent descriptions of the Rule 150 automaton.

Programs

  • Mathematica
    T[ n_, k_] := T[n, k] = Which[k < 0 || k > 2 n, 0, n == k == 0, 1, True, Mod[ T[n - 1, k - 2] + T[n - 1, k - 1] + T[n - 1, k], 2]]; (* Michael Somos, Jun 24 2018 *)
  • PARI
    rown(n) = Vec(lift((x^2 + x + 1)^n * Mod(1, 2))); \\ Michel Marcus, Mar 20 2014

Formula

a(n) = A027907(n) modulo 2. - Michel Marcus, Mar 20 2014

Extensions

Corrected by Hans Havermann, Jan 08 2012

A048705 The rule numbers for 1-D CA composed of Rules "90" and "150" so that each direction occurs only once.

Original entry on oeis.org

90, 150, 1721342310, 140117185019831836588493434554119984790, 113427455640312821160607117168492587690
Offset: 1

Views

Author

Antti Karttunen, Mar 09 1999

Keywords

Comments

The "numerator" (0, 1 and the rest from A020652) is the multiplicity of the "Rule 150" component and the "denominator" (1, 0 and the rest from A020653) is the multiplicity of the "Rule 90" component.
The resulting numbers define one-dimensional linear cellular automata with radius being the sum of the number of the "90" and "150" components.
In hexadecimal the sequence is 5A, 96, 66999966, 69699696969669699696696969699696, 5555555555555555AAAAAAAAAAAAAAAA, ...

Crossrefs

A048706 gives the corresponding "XOR-conjugate" rules.
Cf. A038183, A038184, A048709 (for specific examples). See also A048708, A048720.

Programs

  • Maple
    # The definitions of bit_i and floor_log_2 are given in A048700
    rule90 := proc(seed,n) option remember: local sl, i: if (0 = n) then (seed) else sl := floor_log_2(seed+1); add(((bit_i(rule90(seed,n-1),i)+bit_i(rule90(seed,n-1),i-2)) mod 2)*(2^i), i=0..(2*n)+sl) fi: end:
    rule150 := proc(seed,n) option remember: local sl, i: if (0 = n) then (seed) else sl := floor_log_2(seed+1);
    add(((bit_i(rule150(seed,n-1),i)+bit_i(rule150(seed,n-1),i-1)+bit_i(rule150(seed,n-1),i-2)) mod 2)*(2^i), i=0..((2*n)+sl)) fi: end:
    # Rule 90 and Rule 150 are commutative in respect to each other:
    rule90x150combination := proc(n) local p,q,i; p := extended_A020652[ n ]; # the Rule 150 component [ 0,1,op(A020652) ]
    q := extended_A020653[ n ]; # the Rule 90 component [ 1,0,op(A020653) ]
    RETURN(sum('bit_i(rule150(rule90(i,q),p),(2*(p+q))) * (2^i)','i'=0..(2^((2*(p+q))+1))-1));
    end:

Formula

a(n) = rule90x150combination(n) # See the Maple procedures below.

A048710 Family 1 "Rule 90 x Rule 150 Array" read by antidiagonals.

Original entry on oeis.org

1, 5, 7, 17, 27, 21, 85, 119, 65, 107, 257, 427, 325, 455, 273, 1285, 1799, 1105, 1755, 1365, 1911, 4369, 6939, 5397, 7607, 4097, 6827, 5189, 21845, 30583, 16705, 27499, 20485, 28679, 17745, 28123, 65537
Offset: 0

Views

Author

Antti Karttunen, Mar 18 1999

Keywords

Comments

Infinitely many one-dimensional cellular automaton rules (given in sequence A048705) occur in this array, as combinations of CA-rules "90" (generates rows) and "150" (generates columns).
No pattern occurs twice in such arrays.
Each row/column can be generated from its predecessor row/column with SHIFTXORADJ transformation, given in A048711.

Examples

			   1  5  17   85  257 1105 ... [ beginning of array ]
   7 27 119  427 1799 ...
  21 65 325 1105 5397 ...
		

Crossrefs

Rows = A038183, A048711, A048713, columns = A038184, A048712, A048713, diagonal = A048709. Cf. A048720.

Programs

  • Maple
    trinv := n -> floor((1+sqrt(1+8*n))/2); # Gives integral inverses of the triangular numbers

Formula

a(n) = rule150(rule90(1, (((trinv(n)-1)*(((1/2)*trinv(n))+1))-n)), (n-((trinv(n)*(trinv(n)-1))/2))).

A038185 One-dimensional cellular automaton 'sigma' (Rule 150).

Original entry on oeis.org

1, 3, 5, 13, 17, 59, 81, 219, 257, 899, 1349, 3437, 4353, 15235, 20805, 56173, 65537, 229379, 344069, 876557, 1118225, 3913787, 5313617, 14399195, 16842753, 58949635, 88424453, 225271821, 285282321
Offset: 0

Views

Author

Antti Karttunen, Feb 09 1999

Keywords

Comments

Generation n (starting from the generation 0: 1) cut after the central 1-column and interpreted as a binary number.
Decimal representation of the x-axis, from the left edge to the origin, of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 518", based on the 5-celled von Neumann neighborhood. Initialized with a single black (ON) cell at stage zero. - Robert Price, Feb 22 2017

Crossrefs

Cf. A006977, A006978, A038183, a(n) = floor(A038184[ n ]/2^n)

Programs

  • Maple
    bit_n := (x,n) -> `mod`(floor(x/(2^n)),2);
    sigmacut := proc(n): if (0 = n) then (1)
    else sum('((bit_n(sigmagen(n-1),i+1+n-1)+bit_n(sigmagen(n-1),i+n-1)+bit_n(sigmagen(n-1),i-1+n-1)) mod 2)*(2^i)', 'i'=0..(n)) fi: end:

A118110 State of one-dimensional cellular automaton 'sigma' (Rule 150): 000,001,010,011,100,101,110,111 -> 0,1,1,0,1,0,0,1 at generation n, when started with a single ON cell, regarded as a binary number.

Original entry on oeis.org

1, 111, 10101, 1101011, 100010001, 11101110111, 1010001000101, 110110111011011, 10000000100000001, 1110000011100000111, 101010001010100010101, 11010110110101101101011, 1000100000001000000010001
Offset: 0

Views

Author

Eric W. Weisstein, Apr 13 2006 and N. J. A. Sloane, Jul 28 2014, combined into one entry by N. J. A. Sloane, Oct 20 2015

Keywords

Comments

See A038184 for decimal equivalents.

References

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

Crossrefs

This sequence, A038184 and A071036 are equivalent descriptions of the Rule 150 automaton.
See A071053 for number of ON cells.

Programs

  • Mathematica
    rule = 150; rows = 20; Table[FromDigits[Table[Take[CellularAutomaton[rule, {{1}, 0}, rows-1, {All, All}][[k]], {rows-k+1, rows+k-1}], {k, 1, rows}][[k]]], {k, 1, rows}] (* Robert Price, Feb 21 2016 *)

A048709 Main diagonal of Family 1 "Rule 90 x Rule 150" array.

Original entry on oeis.org

1, 27, 325, 7607, 69649, 1749419, 22103317, 476952263, 4311744769, 116417108763, 1392727114821, 32619053820599, 300171238899985, 7506480532757163, 94597931458646037, 2049660569696039367
Offset: 0

Views

Author

Antti Karttunen, Mar 09 1999

Keywords

Comments

The successive generations of one-dimensional cellular automata rule (k=1,r=2) 1721342310 (hex 66999966) starting from the seed pattern 1.

Crossrefs

A038183, A038184 give the first row and column of Family 1. Cf. A048705.
Showing 1-10 of 14 results. Next