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.

User: Luke Bennet

Luke Bennet's wiki page.

Luke Bennet has authored 5 sequences.

A385414 Number of distinct states of Conway's Game of Life, starting from an n-th level Hilbert curve on a toroidal 2^(n+1)-1 by 2^(n+1)-1 grid.

Original entry on oeis.org

2, 2, 3, 24, 70, 584, 1325, 2082, 5304, 6327, 10679, 11822
Offset: 0

Author

Luke Bennet, Jun 27 2025

Keywords

Comments

The curve is taken with segments of length 2 so that it follows a path through coordinates (2*A059252(t), 2*A059253(t)) for 0 <= t < 2^n.
The size of the toroidal grid is the extent of these coordinates so that the cells on one edge are immediately adjacent to the cells on the opposite side.
The grid has a fixed position and orientation and states differing at any cell are distinct.

Examples

			For n=0, the curve is a single cell on a 1 X 1 toroidal grid and has a(0) = 2 states: initially live, then dead and remaining so.
For n=2 the initial state and two subsequent states are
  o o o . o o o | . . . . . . . | . . . . . . . |
  o . o . o . o | . . . . . . . | . . . . . . . |
  o . o o o . o | . . o . o . . | . . . . . . . |
  o . . . . . o | . . . . . . . | . . . . . . . |
  o o o . o o o | . . o . o . . | . . . . . . . |
  . . o . o . . | . . . . . . . | . . . . . . . |
  o o o . o o o | . . . . . . . | . . . . . . . |
  (generation 1)  (generation 2)  (generation 3)
Every generation after 3 is identical to generation 3, so this sequence has 3 distinct states. Thus, a(2) = 3.
		

Crossrefs

A385493 Number of distinct states in Conway's Game of Life acting on a (2n+1) X (2n+1) toroidal grid starting with (x,y) turned on if and only if x-n + (y-n)*i is a Gaussian prime.

Original entry on oeis.org

1, 1, 1, 6, 9, 4, 4, 5, 14, 12, 17, 5, 8, 19, 15, 34, 20, 21, 19, 77, 52, 29, 58, 39, 27, 27, 68, 31, 27, 27, 27, 70, 49, 129, 83, 43, 153, 40, 82, 128, 60, 457, 436, 79, 99, 71, 71, 178, 125, 281, 121, 121, 94, 231, 94, 94, 385, 122, 94, 94, 175, 306, 156
Offset: 0

Author

Luke Bennet, Jun 30 2025

Keywords

Examples

			For a(3), the sequence of Conway's Game of Life is
 | . o . o . o . | . o . o . o . | . o . . . o . |
 | o . o . o . o | o . . . . . o | o o o o o o o |
 | . o o . o o . | . . o . o . . | . o . . . o . |
 | o . . . . . o | o . . . . . o | . o . . . o . |
 | . o o . o o . | . . o . o . . | . o . . . o . |
 | o . o . o . o | o . . . . . o | o o o o o o o |
 | . o . o . o . | . o . o . o . | . o . . . o . |
  (generation 1)  (generation 2)  (generation 3)
 | . . . o . . . | . . o o o . . | . o . . . o . |
 | . . . o . . . | . . o o o . . | o . . . . . o |
 | . . . o . . . | o o . o . o o | . . . . . . . |
 | o o o . o o o | o o o . o o o | . . . . . . . |
 | . . . o . . . | o o . o . o o | . . . . . . . |
 | . . . o . . . | . . o o o . . | o . . . . . o |
 | . . . o . . . | . . o o o . . | . o . . . o . |
  (generation 4)  (generation 5)  (generation 6)
Every generation after 6 is identical to generation 6, so this sequence has 6 unique states. Thus, a(3) = 6.
		

Crossrefs

Cf. A055025.

Programs

  • Python
    import torch
    import numpy as np
    def prime_mask(limit):
        is_prime = torch.ones(limit + 1, dtype=torch.bool)
        is_prime[:2] = False
        for i in range(2, int(limit**0.5) + 1):
            if is_prime[i]:
                is_prime[i*i : limit+1 : i] = False
        return is_prime
    def Gauss_primes(N):
        A, B = torch.meshgrid(torch.arange(-N, N+1), torch.arange(-N, N+1))
        norm = A**2 + B**2
        is_prime = prime_mask(2*N**2)
        mask = (A != 0) & (B != 0) & is_prime[norm]
        axis_mask = ((A == 0) ^ (B == 0))
        axis_val = (A + B).abs()
        axis_mask &= is_prime[axis_val] & ((axis_val % 4) == 3)
        return mask | axis_mask
    def update(G):
        shifts = [(1,0),(1,1),(0,1),(-1,1),(-1,0),(-1,-1),(0,-1),(1,-1)]
        neighbors = sum(torch.roll(G, shifts=shift, dims=(0,1)) for shift in shifts)
        return (G & ((neighbors == 2) | (neighbors == 3))) | (~G & (neighbors == 3))
    def a(n):
        if n == 0 or n == 1:
            return 1
        G = Gauss_primes(n).to("cuda").to(torch.uint8)
        seen, step = set(), 0
        while True:
            flat = G.flatten().to("cpu").numpy()
            key = bytes(np.packbits(flat))
            if key in seen:
                return step
            seen.add(key)
            G = update(G)
            step += 1

A384509 a(n) = number of iterations of z -> z^2 + c(n) with c(n) = ((5/n+1) + (5/n-1)*i)/(n*sqrt(2)) + 1/4 + (1/2)*i to reach |z| > 2, starting with z = 0.

Original entry on oeis.org

1, 2, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 51, 51, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 71, 71, 73, 74, 75, 76, 77, 78, 79, 80
Offset: 1

Author

Luke Bennet, May 31 2025

Keywords

Comments

a(n)/n seems to converge to Pi/(2*sqrt(2)).
a(n) counts the escape time of points outside the Mandelbrot set that converge to the Mandelbrot set's 1/4 period bulb.

Crossrefs

Programs

  • PARI
    c(n) = ((5/n+1) + (5/n-1)*I)/(n*sqrt(2)) + 1/4 + (1/2)*I;
    a(n) = my(z=0, k=0, c=c(n)); while(norml2(z)<=4, z = z^2 + c; k++); k; \\ Michel Marcus, Jun 01 2025
  • Python
    import mpmath
    from mpmath import iv
    def a(n):
        dps = 1
        while True:
            mpmath.iv.dps = dps
            c = iv.mpc(iv.mpf(5) / n + 1, iv.mpf(5) / n - 1)
            c = c / (n * iv.sqrt(2)) + 0.25 + 0.5j
            z = iv.mpc(0, 0)
            counter = 0
            while (z.real**2 + z.imag**2).b <= 4:
                z = z ** 2 + c
                counter += 1
            if (z.real**2 + z.imag**2).a > 4:
                return counter
            dps *= 2
    

A384513 a(n) = number of iterations of z -> z^2 + c(n) with c(n) = 16/(n^2) + (1/n)*i + 3/8 + (sqrt(3)/8)*i to reach |z| > 2, starting with z = 0.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 6, 7, 7, 8, 8, 9, 9, 10, 10, 10, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 27, 27, 28, 28, 28, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 38, 38, 39, 39, 40
Offset: 1

Author

Luke Bennet, May 31 2025

Keywords

Comments

a(n)/n seems to converge to Pi/6.
a(n) counts the escape time of points outside the Mandelbrot set that converge to the Mandelbrot set's 1/6 period bulb. This is a proven fact and was the motivation for creating the sequence.

Crossrefs

Programs

  • Python
    def a(n):
        dps = 1
        while True:
            mpmath.iv.dps = dps
            c = iv.mpc(iv.mpf(16) / n ** 2 + 0.375, iv.mpf(1) / n + iv.sqrt(3) / 8)
            z = iv.mpc(0, 0)
            counter = 0
            while (z.real**2 + z.imag**2).b <= 4:
                z = z ** 2 + c
                counter += 1
            if (z.real**2 + z.imag**2).a > 4:
                return counter
            dps *= 2

A383750 a(n) = number of iterations of z -> z^2 + c(n) with c(n) = 1/n + (2/(n^2))*i - 1/8 + (3*sqrt(3)/8)*i to reach |z| > 2, starting with z = 0.

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 11, 13, 15, 17, 19, 20, 22, 24, 26, 28, 29, 31, 33, 35, 37, 38, 40, 42, 44, 46, 47, 49, 51, 53, 55, 57, 58, 60, 62, 64, 66, 68, 69, 71, 73, 75, 77, 78, 80, 82, 84, 86, 87, 89, 91, 93, 95, 96, 98, 100, 102, 104, 105, 107, 109, 111, 113, 115, 116, 118, 120
Offset: 1

Author

Luke Bennet, May 08 2025

Keywords

Comments

a(n)/n appears to converge to Pi/sqrt(3).
a(n) counts the escape time of points outside the Mandelbrot set that converge to the Mandelbrot set's 1/3 period bulb.

Crossrefs

Programs

  • Python
    import mpmath
    from mpmath import iv
    def a(n):
        dps = 1
        while True:
            mpmath.iv.dps = dps
            real_part = iv.mpf(1) / n - iv.mpf('0.125')
            imag_part = iv.mpf(2) / (n ** 2) + 3 * iv.sqrt(3) / 8
            c = iv.mpc(real_part, imag_part)
            z = iv.mpc(0, 0)
            counter = 0
            while (z.real**2 + z.imag**2).b <= 4:
                z = z ** 2 + c
                counter += 1
            if (z.real**2 + z.imag**2).a > 4:
                return counter
            dps *= 2