OFFSET
0,2
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
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
Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
Erica Jen, Global properties of cellular automata, Journal of Statistical Physics 43 (1986), pp. 219-242.
N. J. A. Sloane, Illustration of first 20 generations
Eric Weisstein's World of Mathematics, Rule 30.
Stephen Wolfram, Announcing the Rule 30 Prizes, 2019
FORMULA
From Antti Karttunen, Feb 20 2016: (Start)
a(0) = 1, for n >= 1, a(n) = A269160(a(n-1)).
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)
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
-- Reinhard Zumkeller, Jun 08 2013
(Scheme)
;; With memoization-macro definec.
;; Antti Karttunen, Feb 20 2016
(PARI)
A269160(n) = bitxor(n, bitor(2*n, 4*n));
(Python)
def A269160(n): return(n^((n<<1)|(n<<2)))
def genA110240():
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
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.
KEYWORD
easy,nonn,base
AUTHOR
Alexandre Wajnberg and Eric Angelini, Sep 06 2005
EXTENSIONS
More terms from Eric W. Weisstein, Apr 08 2006
Offset corrected by Reinhard Zumkeller, Jun 08 2013
STATUS
approved