|
|
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.
|
|
34
|
|
|
1, 7, 25, 111, 401, 1783, 6409, 28479, 102849, 456263, 1641433, 7287855, 26332369, 116815671, 420186569, 1865727615, 6741246849, 29904391303, 107568396185, 477630335215, 1725755276049, 7655529137527, 27537575631497
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
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
|
|
LINKS
|
Eric Weisstein's World of Mathematics, Rule 30.
|
|
FORMULA
|
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)
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)
|
|
EXAMPLE
|
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).
|
|
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 *)
|
|
PROG
|
(Haskell)
a110240 = foldl (\v d -> 2 * v + d) 0 . map toInteger . a070950_row
(Scheme, with memoization-macro definec)
(PARI)
A269160(n) = bitxor(n, bitor(2*n, 4*n));
(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
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())
|
|
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).
|
|
KEYWORD
|
easy,nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|