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.

A225072 Number of first-quadrant Gaussian primes at taxicab distance 2n-1 from the origin.

This page as a plain text file.
%I A225072 #3 May 03 2013 18:57:50
%S A225072 0,3,4,5,4,7,6,8,8,9,6,9,16,8,12,11,8,18,16,12,18,15,14,15,10,14,18,
%T A225072 28,16,19,22,14,34,23,20,19,22,18,16,27,18,31,40,22,28,26,16,36,28,20,
%U A225072 36,33,20,35,32,26,40,40,26,28,34,24,46,37,28,45,30,34,36
%N A225072 Number of first-quadrant Gaussian primes at taxicab distance 2n-1 from the origin.
%C A225072 Except for 1+I, 1-I, -1+I, and -1-I, all Gaussian primes are an odd taxicab distance from the origin. Primes on the x- and y-axis are counted only once. That is, although p and p*I are Gaussian primes (for primes p in A002145), we count only p as being a first-quadrant Gaussian prime.
%H A225072 T. D. Noe, <a href="/A225072/b225072.txt">Table of n, a(n) for n = 1..10000</a>
%t A225072 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, 1, 200, 2}]/4
%Y A225072 Cf. A002145, A218858, A225071.
%K A225072 nonn
%O A225072 1,2
%A A225072 _T. D. Noe_, May 03 2013