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

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) );

A048725 a(n) = Xmult(n,5) or rule90(n,1).

Original entry on oeis.org

0, 5, 10, 15, 20, 17, 30, 27, 40, 45, 34, 39, 60, 57, 54, 51, 80, 85, 90, 95, 68, 65, 78, 75, 120, 125, 114, 119, 108, 105, 102, 99, 160, 165, 170, 175, 180, 177, 190, 187, 136, 141, 130, 135, 156, 153, 150, 147, 240, 245, 250, 255, 228, 225, 238, 235, 216, 221, 210
Offset: 0

Views

Author

Antti Karttunen, Apr 26 1999

Keywords

Comments

The orbit of 1 under iteration of this function is the Sierpinski gasket A038183. It is called "rule 90" because the 8 bits of 90 = 01011010 in binary give bit k of the result as function of the value in {0,...,7} made out of bits k,k+1,k+2 of the input (i.e., floor(input / 2^k) mod 8). - M. F. Hasler, Oct 09 2017

Examples

			   n (in binary) | 4n [binary] | n XOR 4n [binary] | [decimal] = a(n)
          0      |        0    |           0       |        0
          1      |      100    |         101       |        5
         10      |     1000    |        1010       |       10
         11      |     1100    |        1111       |       15
        100      |    10000    |       10100       |       20
        101      |    10100    |       10001       |       17
   etc.
		

Crossrefs

Cf. A038183.
Cf. A353167 (terms sorted).

Programs

Formula

a(n) = n XOR n*2 XOR (n XOR n*2)*2 = A048724(A048724(n)). - Reinhard Zumkeller, Nov 12 2004
a(n) = n XOR (4n). - M. F. Hasler, Oct 09 2017

A048727 a(n) = Xmult(n,7) or rule150(n,1).

Original entry on oeis.org

0, 7, 14, 9, 28, 27, 18, 21, 56, 63, 54, 49, 36, 35, 42, 45, 112, 119, 126, 121, 108, 107, 98, 101, 72, 79, 70, 65, 84, 83, 90, 93, 224, 231, 238, 233, 252, 251, 242, 245, 216, 223, 214, 209, 196, 195, 202, 205, 144, 151, 158, 153, 140, 139, 130, 133, 168, 175
Offset: 0

Views

Author

Antti Karttunen, Apr 26 1999

Keywords

Comments

Sequence gives binary encodings of polynomials in maximal ideal generated by x^2 + x + 1 in the polynomial ring GF(2)[X]. E.g. 1 * x^2+x+1 = x^2 +x+1 = 111 (binary encoding) = 7 (in decimal) x * x^2+x+1 = x^3+x^2+x = 1110 = 14 x+1 * x^2+x+1 = x^3+1 = 1001 = 9 x^2 * x^2+x+1 = x^4+x^3+x^2 = 11100 = 28 x^2+1 * x^2+x+1 = x^4+x^3+x+1 = 11011 = 27 etc.

Crossrefs

Programs

A038184 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, converted to a decimal number.

Original entry on oeis.org

1, 7, 21, 107, 273, 1911, 5189, 28123, 65793, 460551, 1381653, 7039851, 17829905, 124809335, 340873541, 1840690907, 4295032833, 30065229831, 90195689493, 459568513131, 1172543963409, 8207807743863, 22286925370437
Offset: 0

Views

Author

Antti Karttunen, Feb 15 1999

Keywords

Comments

Generation n (starting from the generation 0: 1) interpreted as a binary number, but written in base 10.
Rows of the mod 2 trinomial triangle (A027907), interpreted as binary numbers: 1, 111, 10101, 1101011, ... (A118110). - Jacob A. Siehler, Aug 25 2006
See A071053 for number of ON cells. - N. J. A. Sloane, Jul 28 2014

Examples

			Bit patterns with "0" replaced by "." for visibilty [_Georg Fischer_, Dec 16 2021]:
  0:                    1
  1:                   111
  2:                  1.1.1
  3:                 11.1.11
  4:                1...1...1
  5:               111.111.111
  6:              1.1...1...1.1
  7:             11.11.111.11.11
  8:            1.......1.......1
  9:           111.....111.....111
  10:         1.1.1...1.1.1...1.1.1
  11:        11.1.11.11.1.11.11.1.11
  12:       1...1.......1.......1...1
  13:      111.111.....111.....111.111
  14:     1.1...1.1...1.1.1...1.1...1.1
  15:    11.11.11.11.11.1.11.11.11.11.11
		

Crossrefs

Cf. A006977, A006978, A038183, A038185 (other cellular automata).
This sequence, A071036 and A118110 are equivalent descriptions of the Rule 150 automaton.

Programs

  • Maple
    bit_n := (x,n) -> `mod`(floor(x/(2^n)),2);
    sigmagen := proc(n) option remember: if (0 = n) then (1)
    else sum('((bit_n(sigmagen(n-1),i)+bit_n(sigmagen(n-1),i-1)+bit_n(sigmagen(n-1),i-2)) mod 2)*(2^i)', 'i'=0..(2*n)) fi: end:
  • Mathematica
    f[n_] := Sum[2^k*Coefficient[ #, x, k], {k, 0, 2n}] & @ Expand[(1 + x + x^2)^n, Modulus -> 2] (* Jacob A. Siehler, Aug 25 2006 *)
  • PARI
    a(n) = subst(lift(Pol(Mod([1,1,1],2),'x)^n),'x,2);
    vector(23,n,a(n-1))  \\ Gheorghe Coserea, Jun 12 2016
Showing 1-5 of 5 results.