login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A348926 Length of the cycle that is reached for an n X n NGOP configuration (see Link for definition). 0
1, 1, 2, 4, 12, 44, 8, 16, 120, 8, 8, 21384, 14040, 40 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
For n = 15, no cycle was found in the first 10^6 iterations. - Giorgos Kalogeropoulos, Nov 08 2021
LINKS
Raghavendra Bhat, A Game of Primes, arXiv:2111.01374 [math.GM], 2021. See Figure 12 p. 11.
MATHEMATICA
Table[M1=Partition[Range[n^2], n]; Ma={#, 0}&/@#&/@MapAt[Reverse, M1, List/@Select[Range@n, EvenQ]]; Neig[x_, y_]:=Ma[[#, #2]]&@@@Select[{x, y}+#&/@Most@Tuples[{1, -1, 0}, 2], Max@#<=n&&Min@#>0&]; F[q_, w_]:=(len=Length@Union@Join[Select[Neig[q, w], PrimeQ@First@#&], Select[Neig[q, w], Last@#==-1&]]; If[Last@Ma[[q, w]]==0, If[len>2, Ma[[q, w]]/. 0->-1, Ma[[q, w]]], If[len>3||len==0, Ma[[q, w]]/. -1->0, Ma[[q, w]]]]); lst={}; i=0; While[FreeQ[lst, Ma], AppendTo[lst, Ma]; Ma=Partition[F@@@Range@n~Tuples~2, n]; i++]; i-First@@Position[lst, Ma]+1, {n, 11}] (* Giorgos Kalogeropoulos, Nov 06 2021 *)
PROG
(PARI) find(nm, v) = {forstep (n=#v-1, 1, -1, if (v[#v] == v[n], return(#v-n); ); ); }
vm(mi, mp, n, i, j) = if ((i<1) || (j<1) || (i>n) || (j>n), 0, mi[i, j] || isprime(mp[i, j]));
nbm(mi, mp, n, i, j) = vm(mi, mp, n, i-1, j-1) + vm(mi, mp, n, i-1, j) + vm(mi, mp, n, i-1, j+1) + vm(mi, mp, n, i, j-1) + vm(mi, mp, n, i, j+1) + vm(mi, mp, n, i+1, j-1) + vm(mi, mp, n, i+1, j) + vm(mi, mp, n, i+1, j+1);
cell(mi, mp, n, i, j) = {my(nb = nbm(mi, mp, n, i, j)); if (mi[i, j], if ((nb>=4) || (nb==0), return (0)); return(1)); return (nb>=3); }
life(mi, mp, n) = matrix(n, n, i, j, cell(mi, mp, n, i, j));
a(n) = {my(mp=matrix(n, n, i, j, if (i%2, n*(i-1)+j, n*i-j+1))); my(mi=matrix(n, n)); my(found = 0); my(list = List()); listput(list, mi); while (! found, my(nmi = life(mi, mp, n)); listput(list, nmi); found = find(nmi, list); mi = nmi; ); found; }
CROSSREFS
Sequence in context: A179973 A275780 A334272 * A039301 A346505 A180205
KEYWORD
nonn,more
AUTHOR
Michel Marcus, Nov 04 2021
EXTENSIONS
a(13)-a(14) from Giorgos Kalogeropoulos, Nov 08 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 9 10:34 EDT 2024. Contains 372350 sequences. (Running on oeis4.)