login
A222595
Number of different Gaussian primes in the Gaussian prime spiral beginning at the n-th first-quadrant Gaussian prime (A222593).
3
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
OFFSET
1,1
COMMENTS
This is the idea of A222299 extended to first-quadrant Gaussian primes. The first odd number is a(79) = 29.
REFERENCES
Joseph O'Rourke and Stan Wagon, Gaussian prime spirals, Mathematics Magazine, vol. 86, no. 1 (2013), p. 14.
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]}]
CROSSREFS
Cf. A222298 (spiral lengths beginning at the n-th positive real Gaussian prime).
Sequence in context: A355992 A233149 A169688 * A103225 A303333 A324517
KEYWORD
nonn
AUTHOR
T. D. Noe, Feb 27 2013
STATUS
approved