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.

A268754 The period of an n X 1 rectangular oscillator in the B1/S Life-like cellular automaton.

This page as a plain text file.
%I A268754 #51 Sep 04 2024 13:17:21
%S A268754 1,2,1,6,4,14,1,14,12,62,8,126,28,30,1,30,28,1022,24,126,124,4094,16,
%T A268754 2046,252,1022,56,32766,60,62,1,62,60,8190,56,174762,2044,8190,48,
%U A268754 2046,252,254,248,8190,8188,16777214,32,4194302,4092,510,504,134217726,2044,2097150
%N A268754 The period of an n X 1 rectangular oscillator in the B1/S Life-like cellular automaton.
%C A268754 The seed in each case is a single live cell at the left end.
%C A268754 Terms of the form 2^k-1 have a period of 1 since all cells die.
%C A268754 In binary, all terms (except the 1's) have at least one 1 followed by at least one 0. The exceptions are the 36th and 94th terms and their derivatives, which have alternating 1's and 0's in their binary expansion.
%H A268754 Adam P. Goucher, <a href="/A268754/b268754.txt">Table of n, a(n) for n = 1..200</a> (terms for n = 1..99 from E-Hern Lee)
%H A268754 Lee Burnette, <a href="http://goo.gl/szXPO8">Variations of Life</a>. [dead link]
%H A268754 Lee Burnette, <a href="http://play.starmaninnovations.com/static/d3applets/renders/WeNmxtzjTi.gif">Oscillator for n=10</a>. [dead link]
%H A268754 Stack Exchange Network chat, <a href="http://chat.stackexchange.com/transcript/message/27539633#27539633">Initial message</a>.
%H A268754 Stack Exchange Network chat, <a href="http://chat.stackexchange.com/rooms/35699/electrons-in-a-wire">Electrons in a wire</a>.
%F A268754 No general formula for even-indexed terms is known. For odd-indexed terms, a(2n+1) = 2*a(n), except when n is of the form (2^k - 1), in which case a(n) = 1.
%e A268754 a(10) = 62 because a strip of 10 cells has period 62 in this rule.
%t A268754 g = Function[{sq, p}, Module[{l = Length[sq]},
%t A268754 Do[If[sq[[i]] == sq[[j]], Return[p^(j - 1) - p^(i - 1)]],
%t A268754 {j, 2, l}, {i, 1, j - 1}]]];
%t A268754 MPM = Algebra`MatrixPowerMod;
%t A268754 EventualPeriod = Function[{m, v, p},
%t A268754 Module[{n = Length[m], w, sq, k, primes},
%t A268754 sq = NestList[(MPM[#, p, p]) &, m, n];
%t A268754 w = Mod[Last[sq].v, p];
%t A268754 sq = Map[(Mod[#.w, p]) &, sq];
%t A268754 k = g[sq, p];
%t A268754 If[k == Null, k = p^n Apply[LCM, Table[p^r - 1, {r, 1, n}]]];
%t A268754 primes = Map[First, FactorInteger[k]];
%t A268754 primes = Select[primes, (# > 1) &];
%t A268754 While[Length[primes] > 0,
%t A268754 primes = Select[primes, (Mod[k, #] == 0) &];
%t A268754 primes = Select[primes, (Mod[MPM[m, k/#, p].w, p] == w) &];
%t A268754 k = k/Fold[Times, 1, primes];
%t A268754 ]; k ]];
%t A268754 mat = Function[{n}, Table[Boole[Abs[i - j] == 1], {i, 1, n}, {j, 1, n}]];
%t A268754 vec = Function[{n}, Table[Boole[i == 1], {i, 1, n}]];
%t A268754 Table[EventualPeriod[mat[n], vec[n], 2], {n, 1, 100}]
%t A268754 (* _Adam P. Goucher_, Jan 13 2019 *)
%o A268754 (Python)
%o A268754 def electron_period(n):
%o A268754   wire_mask = (1 << n) - 1
%o A268754   power = lam = 1
%o A268754   tortoise, hare = 1, 2
%o A268754   while tortoise != hare:
%o A268754     if power == lam:
%o A268754       tortoise = hare
%o A268754       power *= 2
%o A268754       lam = 0
%o A268754     hare = ((hare << 1) ^ (hare >> 1)) & wire_mask
%o A268754     lam += 1
%o A268754   return lam
%Y A268754 Even-indexed terms are exactly A160657. [corrected by _Adam P. Goucher_, Jan 13 2019]
%Y A268754 Seems to be a shifted bisection of A334504 and A334507.
%K A268754 nonn
%O A268754 1,2
%A A268754 _Lee Burnette_, Feb 12 2016