OFFSET
1,3
LINKS
Ray Chandler, Table of n, a(n) for n = 1..10000
C. Foster, Squares Within Squares, Mathematical Gazette, 96(537), 96.47, 2012.
Eugen J. Ionascu, Ehrhart polynomial for lattice squares, cubes and hypercubes, arXiv:1508.03643 [math.NT], 2015. (Cites A194154 but gives a different sequence, which is now A269741.)
MATHEMATICA
nmax = 1000;
a1 = {};
a = 1;
While[
2 (a - 1)^2 <= nmax,
b = a;
While[
c = (a - 1)^2 + (b - 1)^2;
c <= nmax,
h = GCD[a, b];
c += 2 (h - 1);
If[c <= nmax, AppendTo[a1, c]];
b++;
];
a++;
];
a1 = Union[a1]
(* Ray Chandler, Jun 01 2015 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Colin Foster, Aug 17 2011
EXTENSIONS
Extended by Ray Chandler, Jun 01 2015
STATUS
approved