OFFSET
0,2
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
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
A. J. Macfarlane, Generating functions for integer sequences defined by the evolution of cellular automata..., Fig.9
Eric Weisstein's World of Mathematics, Rule 90
Wikipedia, Rule 90
Stephen Wolfram, Geometry of Binomial Coefficients, Amer. Math. Monthly, Volume 91, Number 9, November 1984, pages 566-571.
S. Wolfram, O. Martin, and A.M. Odlyzko, Algebraic Properties of Cellular Automata (1984), Communications in Mathematical Physics, 93 (March 1984) 219-258.
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
EXAMPLE
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
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 *)
PROG
(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)<<k for k in range((n<<1)+1)) # Chai Wah Wu, May 02 2023
(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 */
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Antti Karttunen, Feb 09 1999
STATUS
approved