A318858 Number of still-lifes synthesizable from n gliders in Conway's game of Life.
0, 6, 11, 111, 114, 217
Offset: 1
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.
a(0)=1 because there is only the empty configuration. a(10)=2+15 because the 10-line needs two steps to become a pentadecathlon. a(56)=0 because the 56-line sends four gliders to outer space.
{- program for verification of periodic cases. The non-periodic cases listed here evolve into a periodic kernel plus gliders whose paths ahead do not intersect each other or the kernel (gliders marching in single file are not counted as intersecting). -} import Data.Set main = print [if n `elem` known then 0 else a n | n<-[0..105]] known = [56, 71, 72, 75, 78, 82, 85, 86, 87, 88, 91, 92, 93, 94, 96, 98, 100, 102, 103, 105] a n = count empty (iterate evolve (fromList [(x, 0) | x<-[1..n]])) neighbors (x, y) = fromList [(x+u, y+v) | u<-[ -1, 0, 1], v<-[ -1, 0, 1], (u, v)/=(0, 0)] evolve life = let fil f = Data.Set.filter (\x-> f (size (life `intersection` neighbors x))) in (life `difference` fil (\k-> k<2 || k>3) life) `union` fil (== 3) (unions (Prelude.map neighbors (elems life)) `difference` life) count o (x:xs) | x `member` o = 0 | otherwise = 1 + count (o `union` singleton x) xs
Comments