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

A269164 Numbers not in range of A269160; indices of zeros in A269162 from n >= 1 onward.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 55, 57, 58, 59, 60, 61, 62, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96
Offset: 1

Views

Author

Antti Karttunen, Feb 20 2016

Keywords

Comments

Natural numbers n for which there does not exist any number k such that A269160(k) = n.
These are binary representations (shown in decimal) of Garden of Eden patterns in Wolfram's Rule 30 cellular automaton if infinite predecessors are forbidden.

Crossrefs

Complement: A269163.
Indices of zeros in A269162 and A269166 (after the initial zero).
Cf. A269169 (left inverse).

Programs

  • Mathematica
    terms = 100; Clear[f]; f[max_] := f[max] = (s = Sort[Table[BitXor[n, BitOr[2n, 4n]], {n, 0, max}]]; Complement[Range[Last[s]], s][[1 ;; terms ]]); f[terms]; f[max = 2 terms]; While[Print[max]; f[max] != f[max/2], max = 2 max]; A269164 = f[max] (* Jean-François Alcover, Feb 23 2016 *)

Formula

Other identities. For all n >= 1:
A269169(a(n)) = n.

A269162 a(0) = 0, for n > 0, a(n) = the least (necessarily also unique) k such that A269160(k) = n, or 0 if no such k exists.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 6, 5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 14, 13, 12, 11, 10, 0, 8, 0, 0, 0, 0, 0, 0, 9, 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, 0, 31, 30, 29, 28, 27, 26, 0, 24, 23, 22, 21, 20, 0, 0, 25
Offset: 0

Views

Author

Antti Karttunen, Feb 20 2016

Keywords

Comments

If n > 0 and a(n) > 0 then a(n) is the unique finite predecessor of the configuration encoded in the binary representation of n (A007088) when Wolfram's Rule 30 cellular automaton is applied.

Crossrefs

Cf. A110240, A269160, A269163, A269164 (indices of zeros), A269165, A269166.

Programs

  • Mathematica
    (* empirical *) a[n_] := Module[{k}, For[k = Floor[n/7], k <= Ceiling[n/3], k++, If[BitXor[k, BitOr[2k, 4k]] == n, Return[k]]]; 0]; Table[a[n], {n, 0, 16387}] (* Jean-François Alcover, Feb 23 2016 *)
  • Scheme
    (define (A269162 n) (let loop ((p 0)) (cond ((= n (A269160 p)) p) ((> p n) 0) (else (loop (+ 1 p)))))) ;; Very slow implementation.
    (define (A269162 n) (if (zero? n) n (let ((nwid-2 (- (A000523 n) 2))) (let loop ((p (if (< n 4) 0 (A000079 nwid-2)))) (let ((k (A269160 p))) (cond ((= n k) p) ((> (A000523 p) nwid-2) 0) (else (loop (+ 1 p))))))))) ;; Somewhat optimized.

Formula

Other identities. For all n >= 0:
a(A269160(n)) = n. [This sequence works as a left inverse of A269160.]
a(A110240(n+1)) = A110240(n).

A269163 Numbers which have a finite predecessor in Wolfram's Rule 30 cellular automaton; range of A269160 sorted into ascending order.

Original entry on oeis.org

0, 7, 13, 14, 25, 26, 27, 28, 49, 50, 51, 52, 53, 54, 56, 63, 97, 98, 99, 100, 101, 102, 104, 105, 106, 107, 108, 111, 112, 119, 125, 126, 193, 194, 195, 196, 197, 198, 200, 201, 202, 203, 204, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 221, 222, 223, 224, 231, 237, 238, 249, 250, 251, 252, 385, 386, 387, 388
Offset: 0

Views

Author

Antti Karttunen, Feb 20 2016

Keywords

Comments

Numbers which have a finite predecessor in Wolfram's Rule 30 cellular automaton. The configuration of white and black cells is encoded in the binary representation (A007088) of each number.
The indexing starts from zero, because a(0) = 0 is a special case in this sequence. (Zero is the only number which is its own predecessor).

Crossrefs

Complement: A269164.

Programs

  • Mathematica
    terms = 100; Clear[f]; f[max_] := f[max] = Sort[Table[BitXor[n, BitOr[2n, 4n]], {n, 0, max}]][[1 ;; terms]]; f[terms]; f[max = 2 terms]; While[ Print[max]; f[max] != f[max/2], max = 2 max]; A269163 = f[max] (* Jean-François Alcover, Feb 23 2016 *)

A269168 Rule 30 binary tree permutation: a(1) = 1, a(2n) = A269160(a(n)), a(2n+1) = A269164(1+a(n)).

Original entry on oeis.org

1, 7, 2, 25, 9, 14, 3, 111, 33, 63, 11, 50, 18, 13, 4, 401, 143, 231, 41, 193, 79, 53, 15, 222, 66, 126, 22, 51, 17, 28, 5, 1783, 529, 945, 175, 825, 295, 223, 55, 839, 257, 497, 95, 203, 69, 49, 19, 802, 286, 462, 82, 386, 158, 106, 30, 221, 67, 119, 21, 100, 36, 27, 6, 6409, 2295, 3703, 657, 3159, 1201, 849, 233
Offset: 1

Views

Author

Antti Karttunen, Feb 21 2016

Keywords

Comments

This sequence can be represented as a binary tree. Each left hand child is produced as A269160(n), and each right hand child as A269164(1+n), when the parent node contains n:
|
...................1...................
7 2
25......../ \........9 14......../ \........3
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
111 33 63 11 50 18 13 4
401 143 231 41 193 79 53 15 222 66 126 22 51 17 28 5
etc.
Each maximal leftward branch (e.g. 1, 7, 25, ... (= A110240) or 9, 63, 193, ... or 2, 14, 50, ...) gives a trajectory of Rule 30 cellular automaton starting from a particular "seed configuration" which are given in A269164.

Crossrefs

Inverse: A269167.
Cf. A110240 (the left edge).

Programs

  • Mathematica
    nmax = (* sequence length *) 100; terms (* from A269164 *) = 2000; Clear[a, f]; A269160[n_] := BitXor[n, BitOr[2 n, 4 n]]; f[max_] := f[max] = (s = Sort[Table[A269160[n], {n, 0, max}]]; Complement[Range[Last[s]], s][[1 ;; terms]]); f[terms]; f[max = 2 terms]; While[f[max] != f[max/2], max = 2 max]; A269164[n_Integer] := If[n > Length[f[max]], 0, f[max][[n]]]; a[1] = 1; a[n_] := a[n] = If[EvenQ[n], A269160[a[n/2]], A269164[1 + a[(n - 1)/2]]]; A269168 = Table[a[n], {n, 1, nmax}] (* Jean-François Alcover, Feb 23 2016 *)

Formula

a(1) = 1, after which, a(2n) = A269160(a(n)), a(2n+1) = A269164(1+a(n)).

A269167 Permutation of natural numbers: a(1) = 1, a(A269160(n)) = 2*a(n), a(A269164(n+1)) = 1+(2*a(n)).

Original entry on oeis.org

1, 3, 7, 15, 31, 63, 2, 127, 5, 255, 11, 511, 14, 6, 23, 1023, 29, 13, 47, 2047, 59, 27, 95, 4095, 4, 126, 62, 30, 119, 55, 191, 8191, 9, 253, 125, 61, 239, 111, 383, 16383, 19, 507, 251, 123, 479, 223, 767, 32767, 46, 12, 28, 1022, 22, 510, 39, 254, 1015, 503, 247, 959, 447, 1535, 10, 65535, 93, 25, 57, 2045, 45
Offset: 1

Views

Author

Antti Karttunen, Feb 21 2016

Keywords

Crossrefs

Programs

  • Mathematica
    terms = 100; A269160[n_] := BitXor[n, BitOr[2 n, 4 n]]; f[max_] := f[max] = (s = Sort[Table[A269160[n], {n, 0, max}]]; Complement[Range[Last[s]], s][[1 ;; terms]]); f[terms]; f[max = 2 terms]; While[f[max] != f[max/2], max = 2 max]; A269164[n_] := f[max][[n]]; a[1]=1; eq[n_] := a[A269160[n]] == 2*a[n] && a[A269164[n+1]] == 1 + 2*a[n]; A269167 = Array[a, terms-1] /. Solve[Array[eq, terms-1]] // First (* Jean-François Alcover, Feb 23 2016 *)

Formula

a(1) = 1, for n > 1, if A269162(n) > 0 [when n is in A269163], a(n) = 2*a(A269162(n)), otherwise [when n is in A269164], a(n) = 1 + 2*a(A269169(n)-1).

A110240 Decimal form of binary integer produced by the ON cells at n-th generation following Wolfram's Rule 30 cellular automaton starting from a single ON-cell represented as 1.

Original entry on oeis.org

1, 7, 25, 111, 401, 1783, 6409, 28479, 102849, 456263, 1641433, 7287855, 26332369, 116815671, 420186569, 1865727615, 6741246849, 29904391303, 107568396185, 477630335215, 1725755276049, 7655529137527, 27537575631497
Offset: 0

Views

Author

Keywords

Comments

See A245549 for binary equivalents. See A070952 for number of ON cells. - N. J. A. Sloane, Jul 28 2014
For n > 0: 3 < a(n+1) / a(n) < 5, floor(a(n+1)/a(n)) = A010702(n+1). - Reinhard Zumkeller, Jun 08 2013
Iterates of A269160 starting from a(0) = 1. See also A269168. - Antti Karttunen, Feb 20 2016
Also, the decimal representation of the n-th generation of the "Rule 66847740" 5-neighbors elementary cellular automaton starting with a single ON (black) cell. - Philipp O. Tsvetkov, Jul 17 2019

Examples

			a(1)=1 because the automaton begins at first "generation" with one black cell: 1;
a(2)=5 because one black cell, through Rule 30 at 2nd generation, produces three contiguous black cells: 111 (binary), so 7 (decimal);
a(3)=25 because the third generation is "black black white white black" cells: 11001, so 25 (decimal).
		

Crossrefs

Cf. A030101, A070950, A051023, A092539, A092540, A070952 (number of ON cells, the binary weight of terms), A100053, A100054, A100055, A094603, A094604, A000225, A074890, A010702, A245549, A269160, A269162.
Cf. A269165 (indices of ones in this sequence).
Cf. A269166 (a left inverse).
Left edge of A269168.
Cf. also A265281, A328106.
For bitwise XOR (and OR) combinations with other such 1D CA trajectories, see for example: A327971, A327972, A327973, A327976, A328103, A328104.

Programs

  • Haskell
    a110240 = foldl (\v d -> 2 * v + d) 0 . map toInteger . a070950_row
    -- Reinhard Zumkeller, Jun 08 2013
    
  • Mathematica
    rows = 23; ca = CellularAutomaton[30, {{1}, 0}, rows-1]; Table[ FromDigits[ ca[[k, rows-k+1 ;; rows+k-1]], 2], {k, 1, rows}] (* Jean-François Alcover, Jun 07 2012 *)
  • PARI
    A269160(n) = bitxor(n, bitor(2*n, 4*n));
    A110240(n) = if(!n,1,A269160(A110240(n-1))); \\ Antti Karttunen, Oct 05 2019
    
  • Python
    def A269160(n): return(n^((n<<1)|(n<<2)))
    def genA110240():
        '''Yield successive terms of A110240 (Rule 30) starting from A110240(0)=1.'''
        s = 1
        while True:
           yield s
           s = A269160(s)
    def take(n, g):
        '''Returns a list composed of the next n elements returned by generator g.'''
        z = []
        if 0 == n: return(z)
        for x in g:
            z.append(x)
            if n > 1: n = n-1
            else: return(z)
    take(30, genA110240())
    # Antti Karttunen, Oct 05 2019
  • Scheme
    ;; With memoization-macro definec.
    (definec (A110240 n) (if (zero? n) 1 (A269160 (A110240 (- n 1)))))
    ;; Antti Karttunen, Feb 20 2016
    

Formula

From Antti Karttunen, Feb 20 2016: (Start)
a(0) = 1, for n >= 1, a(n) = A269160(a(n-1)).
a(n) = A030101(A265281(n)). [The rule 30 is the mirror image of the rule 86.]
A269166(a(n)) = n for all n >= 0. (End)
From Antti Karttunen, Oct 05 2019: (Start)
For n >= 1, a(n) = a(n-1) XOR 2*A328104(n-1).
For n >= 1, a(n) = 2*a(n-1) XOR A327973(n). (End)

Extensions

More terms from Eric W. Weisstein, Apr 08 2006
Offset corrected by Reinhard Zumkeller, Jun 08 2013

A051023 Middle column of rule-30 1-D cellular automaton, from a lone 1 cell.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

A092539(n) gives the value of prefix of length n+1, seen as a binary number. - Reinhard Zumkeller, Jun 08 2013
Also middle column of rule 86 1-D cellular automaton, from a lone 1 cell, as rule 86 is the mirror image of rule 30. - Antti Karttunen, Oct 03 2019

Crossrefs

Cf. A070950, A269160 (rule 30), A071032, A269161 (rule 86).
Cf. A327974 (adjacent bits xored), A327982 (partial sums), A327983 (run lengths).
Characteristic function of A327984 (gives the positions of ones in this sequence), A327985 (positions of zeros).
Cf. also A328100, A328101, A328102 (neighbor columns).
Cf. A365254 (converted to base 10).

Programs

  • Haskell
    a051023 n = a070950 n n  -- Reinhard Zumkeller, Jun 06 2013
    
  • Mathematica
    CellularAutomaton[30, {{1}, 0}, 101, {All, {0}}]//Flatten
  • PARI
    A051023(n) = ((A110240(n)>>n)%2);
    \\ Or for fast creation of b-files:
    A051023write(up_to) = { my(s=1, n=0); for(n=0,up_to, write("b051023.txt", n, " ", ((s>>n)%2)); s = A269160(s)); }; \\ Antti Karttunen, Oct 03 2019

Formula

a(n) = A070950(n,n). - Reinhard Zumkeller, Jun 06 2013
a(n) = 1 - A226474(n). - Reinhard Zumkeller, Jun 08 2013
From Antti Karttunen, Oct 04 2019: (Start)
a(n) = A000035(floor(A110240(n) / 2^n)).
For n>= 2, a(n) = (A328100(n) OR A328101(n)) XOR A328101(1+n). ["Sideways evaluation"]
(End)

Extensions

Corrected from 64th term by Daniel B. Cristofani (cristofd(AT)hevanet.com), Jan 07 2004

A070952 Number of 1's in n-th generation of 1-D CA using Rule 30, started with a single 1.

Original entry on oeis.org

1, 3, 3, 6, 4, 9, 5, 12, 7, 12, 11, 14, 12, 19, 13, 22, 15, 19, 20, 24, 21, 23, 23, 28, 26, 27, 26, 33, 30, 34, 31, 39, 26, 39, 29, 46, 32, 44, 38, 45, 47, 41, 45, 49, 38, 55, 42, 51, 44, 53, 43, 59, 52, 60, 49, 65, 57, 60, 56, 69, 61, 70, 59, 78, 64, 56, 65, 69, 69
Offset: 0

Views

Author

N. J. A. Sloane, May 19 2002, Aug 10 2009

Keywords

Comments

Number of 1's in n-th row of triangle in A070950.
Row sums in A070950; a(n) = 2*n + 1 - A070951(n). - Reinhard Zumkeller, Jun 07 2013

Examples

			May be arranged into blocks of length 1,1,2,4,8,16,...:
1,
3,
3, 6,
4, 9, 5, 12,
7, 12, 11, 14, 12, 19, 13, 22,
15, 19, 20, 24, 21, 23, 23, 28, 26, 27, 26, 33, 30, 34, 31, 39,
26, 39, 29, 46, 32, 44, 38, 45, 47, 41, 45, 49, 38, 55, 42, 51,
    44, 53, 43, 59, 52, 60, 49, 65, 57, 60, 56, 69, 61, 70, 59, 78,
64, 56, 65, 69, 69, ...
		

Crossrefs

This sequence, A110240, and A245549 all describe the same sequence of successive states. See also A269160.
Cf. A110267 (partial sums), A246023, A246024, A246025, A246026, A246597.
A265703 is an essentially identical sequence.

Programs

  • Haskell
    a070952 = sum . a070950_row  -- Reinhard Zumkeller, Jun 07 2013
  • Mathematica
    Map[Function[Apply[Plus,Flatten[ #1]]], CellularAutomaton[30,{{1},0},100]] (* N. J. A. Sloane, Aug 10 2009 *)
    SequenceCount[s, {1,0}] + 2 SequenceCount[s, {0,0,1}] (* gives a(n) where s is the sequence for row n-1 *) (* Trevor Cappallo, May 01 2021 *)

Extensions

More terms from Hans Havermann, May 26 2002
Corrected offset and initial term - N. J. A. Sloane, Jun 07 2013

A327973 Bitwise XOR of two successive generations (centrally aligned) in the trajectory of rule 30 started from a lone 1 cell: a(n) = A110240(n) XOR 2*A110240(n-1).

Original entry on oeis.org

5, 23, 93, 335, 1493, 5351, 23853, 85951, 382405, 1369943, 6103965, 21996687, 97906325, 350709671, 1562619373, 5631262591, 25064000389, 89782414999, 400033474525, 1441615751887, 6416397448021, 22984338788455, 102408232210605, 369052763468095, 1642598765228869, 5883986891577303, 26216498605021469, 94477513773305103
Offset: 1

Views

Author

Antti Karttunen, Oct 03 2019

Keywords

Crossrefs

Cf. A110240, A269160, A327974 (gives the middle bit), A328107 (binary weight of terms).
Cf. also A327971, A327972, A327976, A328103, A328104 for other such combinations.

Programs

Formula

a(n) = A110240(n) XOR 2*A110240(n-1).

A245549 State of one-dimensional cellular automaton 'sigma' (Rule 30): 000,001,010,011,100,101,110,111 -> 0,0,0,1,1,1,1,0 at generation n, regarded as a binary number.

Original entry on oeis.org

1, 111, 11001, 1101111, 110010001, 11011110111, 1100100001001, 110111100111111, 11001000111000001, 1101111011001000111, 110010000101111011001, 11011110011010000101111
Offset: 0

Views

Author

N. J. A. Sloane, Jul 28 2014

Keywords

Comments

See A110240 for decimal equivalents. See A070952 for number of ON cells.

Crossrefs

Programs

  • Mathematica
    rule=30; 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 *)(* Robert Price, Feb 21 2016 *)
Showing 1-10 of 37 results. Next