OFFSET
1,5
LINKS
Marius A. Burtea, Table of n, a(n) for n = 1..1000
EXAMPLE
For n = 5 the Pythagorean triples are (3, 4, 5) and (4, 3, 5), so a (5) = 2.
For n = 10 the Pythagorean triples are (3, 4, 5), (4, 3, 5), (6, 8, 10) and (8, 6, 10), so a(10) = 4.
For n = 17 the Pythagorean triples are (3, 4, 5), (4, 5, 3), (5, 12, 13), (12, 5, 13), (6, 8, 10), (8, 6, 10), (8, 15, 17), (15, 8, 17), (9, 12, 15) and (12, 9, 15), so a(17) = 10.
MATHEMATICA
nq[n_] := SquaresR[2, n^2]/4 - 1; Accumulate@ Array[nq, 80] (* Giovanni Resta, Jan 23 2020 *)
PROG
(Magma) [#[<x, y, Floor(Sqrt(x^2+y^2))>: x in [1..n], y in [1..n]| IsSquare(x^2+y^2) and Floor(Sqrt(x^2+y^2)) le n]:n in [1..74]]; // Marius A. Burtea, Jan 22 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Ahmed Fares (ahmedfares(AT)my-deja.com), Jul 27 2001
EXTENSIONS
Corrected and extended by Vladeta Jovovic, Jul 28 2001
STATUS
approved