OFFSET
1,3
LINKS
Edward Krogius, Table of n, a(n) for n = 1..1000
Edward Krogius, Illustration of 105 solutions in 100x100 grid
FORMULA
a(n) = Sum_{j=2..n} phi(j) * floor(n^2/j^2).
a(n) = (A338894(n) - n^2)/2.
a(n) = A132189(n^2)/2. - Antti Karttunen, Nov 23 2020
EXAMPLE
For n = 3, we have the following solutions: (1,4), (1,9), (2,8), (4,9), therefore a(3) = 4.
For n = 4, we have the following solutions: (1,4), (1,9), (1,16), (2,8), (3,12), (4,9), (4,16), (9,16), therefore a(4) = 8.
MATHEMATICA
Array[Sum[EulerPhi[j] Floor[(#^2)/(j^2)], {j, 2, #}] &, 59] (* Michael De Vlieger, Dec 11 2020 *)
PROG
(PARI) A339026(n) = sum(i=2, n, floor(n^2/i^2)*eulerphi(i)); \\ Antti Karttunen, Nov 23 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Edward Krogius, Nov 19 2020
STATUS
approved