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.

Showing 1-2 of 2 results.

A273308 Maximum population of a 2 X n still life in Conway's Game of Life.

Original entry on oeis.org

0, 4, 4, 6, 8, 8, 10, 12, 12, 14, 16, 16, 18, 20, 20, 22, 24, 24, 26, 28, 28, 30, 32, 32, 34, 36, 36, 38, 40, 40, 42, 44, 44, 46, 48, 48, 50, 52, 52, 54, 56, 56, 58, 60, 60, 62, 64, 64, 66, 68, 68, 70, 72, 72, 74, 76, 76, 78, 80, 80, 82, 84, 84, 86, 88, 88
Offset: 1

Views

Author

Nathaniel Johnston, May 19 2016

Keywords

Comments

Although the Chu et al. reference does not discuss this problem explicitly, the same methods in that paper can be used to prove the formula for this sequence.

Examples

			a(2) = 4 because the largest number of alive cells in a 2 X 2 still life is 4, which is attained by the block.
a(4) = 6 because the largest number of alive cells in a 2 X 4 still life is 6, which is attained by the snake.
		

Crossrefs

Programs

  • Maple
    seq(4*floor((n+1)*(1/3))+2*floor((1/2)*(`mod`(n+1, 3))), n = 2 .. 110);
  • Mathematica
    LinearRecurrence[{1,0,1,-1},{0,4,4,6,8},70] (* Harvey P. Dale, Apr 19 2023 *)
  • PARI
    concat(0, Vec(2*x^2*(2+x^2-x^3)/((1-x)^2*(1+x+x^2)) + O(x^50))) \\ Colin Barker, May 24 2016
    
  • Python
    def A273308(n): return n+sum(divmod(n,3)) if n > 1 else 0 # Chai Wah Wu, Jan 29 2023

Formula

For n >= 1, a(3*n) = a(3*n-1) = 4*n and a(3*n+1) = 4*n+2.
From Colin Barker, May 24 2016: (Start)
a(n) = a(n-1)+a(n-3)-a(n-4) for n>5.
G.f.: 2*x^2*(2+x^2-x^3) / ((1-x)^2*(1+x+x^2)). (End)
a(n) = A063224(n+1) = A063200(n+1) for n>1. - R. J. Mathar, May 27 2016

A110910 Configurations in the evolution of a line of n cells in Conway's Game of Life, with 0=infinity. For periodic evolutions, a(n)=(preperiod length)+(period length). For non-periodic evolutions, a(n)=0.

Original entry on oeis.org

1, 2, 2, 2, 3, 8, 13, 15, 49, 22, 17, 17, 16, 26, 29, 41, 34, 25, 21, 26, 21, 21, 36, 31, 29, 95, 25, 29, 34, 38, 105, 150, 61, 582, 43, 58, 92, 108, 263, 277, 50, 212, 59, 53, 57, 99, 55, 170, 196, 812, 105, 54, 53, 85, 59, 81, 0, 418, 63, 63, 314, 117, 118, 170, 236, 104
Offset: 0

Views

Author

Paul Stoeber (pstoeber(AT)uni-potsdam.de), Oct 03 2005

Keywords

Comments

If nothing catches up with an outbound glider, then a(n)=0 for n>=1000 because when you watch the horizontal 1000-line evolve in a simulator, around the 490th generation, gliders fly away from the left and right corners before the non-chaotic growing in the middle has finished, so you will see the same local picture in the 490th generation of longer lines.

Examples

			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.
		

References

  • Berlekamp/Conway/Guy, Winning Ways ..., 2nd ed, vol. 4, chapter 25

Crossrefs

Programs

  • Haskell
    {- 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
Showing 1-2 of 2 results.