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-4 of 4 results.

A222594 Length of the Gaussian prime spiral beginning at the n-th first-quadrant Gaussian prime (A222593).

Original entry on oeis.org

4, 28, 28, 4, 12, 28, 28, 12, 4, 12, 4, 28, 12, 4, 12, 100, 4, 100, 12, 12, 28, 28, 12, 28, 28, 4, 260, 12, 12, 100, 12, 12, 100, 100, 4, 12, 4, 12, 260, 4, 4, 12, 260, 100, 12, 260, 260, 4, 4, 260, 260, 260, 100, 12, 100, 28, 260, 4, 12, 100, 12, 12, 260
Offset: 1

Views

Author

T. D. Noe, Feb 27 2013

Keywords

Comments

This is the idea of A222298 extended to first-quadrant Gaussian primes (A222593). It appears that all multiples of 4 eventually appear as a length.

Examples

			The smallest such prime is 1 + i. The spiral is {1 + i, 2 + i, 2 - i, 1 - i, 1 + i}, which consists of only Gaussian primes.
		

References

  • Joseph O'Rourke and Stan Wagon, Gaussian prime spirals, Mathematics Magazine, vol. 86, no. 1 (2013), p. 14.

Crossrefs

Cf. A222298 (spiral lengths beginning at the n-th positive real Gaussian prime).

Programs

  • 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]]] - 1, {n, Length[ps]}]

A222595 Number of different Gaussian primes in the Gaussian prime spiral beginning at the n-th first-quadrant Gaussian prime (A222593).

Original entry on oeis.org

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

Views

Author

T. D. Noe, Feb 27 2013

Keywords

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.

Crossrefs

Cf. A222298 (spiral lengths beginning at the n-th positive real Gaussian prime).

Programs

  • 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]}]

A218858 Number of Gaussian primes at taxicab distance n from the origin.

Original entry on oeis.org

0, 0, 4, 12, 0, 16, 0, 20, 0, 16, 0, 28, 0, 24, 0, 32, 0, 32, 0, 36, 0, 24, 0, 36, 0, 64, 0, 32, 0, 48, 0, 44, 0, 32, 0, 72, 0, 64, 0, 48, 0, 72, 0, 60, 0, 56, 0, 60, 0, 40, 0, 56, 0, 72, 0, 112, 0, 64, 0, 76, 0, 88, 0, 56, 0, 136, 0, 92, 0, 80, 0, 76, 0, 88, 0
Offset: 0

Views

Author

T. D. Noe, Nov 12 2012

Keywords

Comments

Except for n = 2, there are no Gaussian primes at an even taxicab distance from the origin. All terms are multiples of 4. See A218859 for this sequence divided by 4.
The arithmetic derivative of Gaussian primes is either 1, -1, I, or -I.

Examples

			In the taxicab distance, the four Gaussian primes closest to the origin are 1+I, -1+I, -i-I, and 1-I. The 12 at taxicab distance 3 are the four reflections of 3, 2+I, and 1+2I.
		

Crossrefs

Cf. A055025 (norms of Gaussian primes).
Cf. A222593 (first-quadrant Gaussian primes).
Cf. A225071, A225072 (number of terms at an odd distance from the origin).

Programs

  • Mathematica
    Table[cnt = 0; Do[If[PrimeQ[n - i + I*i, GaussianIntegers -> True], cnt++], {i, 0, n}]; Do[If[PrimeQ[i - n + I*i, GaussianIntegers -> True], cnt++], {i, n - 1, 0, -1}]; Do[If[PrimeQ[i - n - I*i, GaussianIntegers -> True], cnt++], {i, 1, n}]; Do[If[PrimeQ[n - i - I*i, GaussianIntegers -> True], cnt++], {i, n - 1, 1, -1}]; cnt, {n, 0, 100}]

A218859 A218858/4.

Original entry on oeis.org

0, 0, 1, 3, 0, 4, 0, 5, 0, 4, 0, 7, 0, 6, 0, 8, 0, 8, 0, 9, 0, 6, 0, 9, 0, 16, 0, 8, 0, 12, 0, 11, 0, 8, 0, 18, 0, 16, 0, 12, 0, 18, 0, 15, 0, 14, 0, 15, 0, 10, 0, 14, 0, 18, 0, 28, 0, 16, 0, 19, 0, 22, 0, 14, 0, 34, 0, 23, 0, 20, 0, 19, 0, 22, 0, 18, 0, 16, 0
Offset: 0

Views

Author

T. D. Noe, Nov 12 2012

Keywords

Comments

Essentially the number of first-quadrant Gaussian primes at taxicab distance n.

Crossrefs

Cf. A222593 (first-quadrant Gaussian primes).
Showing 1-4 of 4 results.