

A225073


Location (x,y) of the first n x n square of composite Gaussian integers in the first quadrant.


3



0, 0, 3, 3, 3, 12, 9, 35, 2, 48, 65, 72, 65, 72, 73, 183, 357, 500, 357, 500, 480, 1250, 2201, 2201, 6, 4347, 4426, 4226, 9911, 13005, 20871, 22511
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


COMMENTS

The location of the bottomleft corner of the square is given. We choose the xcoordinate to be as small as possible. The xcoordinate can be negative if the n x n square is centered on the yaxis, as is the case for n = 5 and n = 13. The square is on the line y = x when n = 1, 2, 12, and 14. The Mathematica program prints the minimum (x,y) point and its squared distance from the origin.


LINKS

Table of n, a(n) for n=1..32.
T. D. Noe, Plot of composite squares


MATHEMATICA

nn = 1000; offset = 15; z = Table[If[PrimeQ[i + j*I, GaussianIntegers > True], 1, 0], {i, offset, nn}, {j, offset, nn}]; off1 = offset + 1; done = False; sz = 0; While[! done, sz++; mn = Infinity; best = {}; Do[sm = 0; Do[sm = sm + z[[i + ii  1, j + jj  1]]; If[sm > 0, Break[]], {ii, sz}, {jj, sz}]; If[sm == 0, d = (i  off1)^2 + (j  off1)^2; If[d <= mn, mn = d; best = {i  off1, j  off1}]], {i, off1  sz, nn  1}, {j, i, nn  1}]; If[mn < Infinity, Print[{Sort[best], mn}], done = True]]


CROSSREFS

Cf. A225074 (x coordinates), A225075 (y coordinates).
Sequence in context: A101480 A156715 A133797 * A152575 A170851 A052900
Adjacent sequences: A225070 A225071 A225072 * A225074 A225075 A225076


KEYWORD

sign,more,hard


AUTHOR

T. D. Noe, May 04 2013


STATUS

approved



