OFFSET
1,2
COMMENTS
For a given Gaussian prime u, the size of its gap is the minimum of norm(u-v) as v varies over all other Gaussian primes, where norm(a+b*i)=a^2+b^2. Only the small Gaussian primes 1+i and 2+i (and their associates and reflections) have gaps of diameter 1.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
MATHEMATICA
q=12; imax=2*q^2; lst=Select[Union[Flatten[Table[2*x^2+2*y^2, {x, 0, q}, {y, 0, x}]]], #<=imax&]; Join[{1}, Drop[lst, 1]] (* Vladimir Joseph Stephan Orlovsky, Apr 20 2011 *)
PROG
(Sage)
def A128106_list(max):
R = []; s = 1; sq = 1
for n in (0..max//2):
if n == s:
sq += 1;
s = sq*sq;
for k in range(sq):
if is_square(n-k*k):
R.append(2*n)
break
R[0] = 1
return R
A128106_list(274) # Peter Luschny, Jun 20 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Feb 15 2007
STATUS
approved