| DATA
|
4, 24, 24, 4, 8, 22, 22, 8, 4, 8, 4, 22, 8, 4, 10, 92, 4, 92, 10, 10, 22, 22, 10, 22, 22, 4, 172, 10, 10, 92, 10, 10, 92, 92, 4, 10, 4, 10, 172, 4, 4, 10, 172, 92, 10, 172, 172, 4, 4, 172, 172, 172, 92, 10, 92, 28, 172, 4, 12, 92, 10, 10, 172, 92, 4, 12, 172, 28
|
| MATHEMATICA
|
loop[n_] := Module[{p = n, direction = 1}, lst = {n}; While[While[p = p + direction; ! PrimeQ[p, GaussianIntegers -> True]]; direction = direction*(-I); AppendTo[lst, p]; ! (p == n && direction == 1)]; Length[lst]]; nn = 20; ps = {}; Do[If[PrimeQ[i + (j - i) I, GaussianIntegers -> True], AppendTo[ps, i + (j-i)*I]], {j, 0, nn}, {i, 0, j}]; Table[loop[ps[[n]]]; Length[Union[lst]], {n, Length[ps]}]
|