login
a(n) = A000982(n) - A132188(n).
2

%I #11 Aug 29 2023 10:11:51

%S 0,0,2,2,6,10,16,20,24,32,42,50,62,74,88,96,112,124,142,158,178,198,

%T 220,240,256,280,302,326,354,382,412,436,468,500,534,558,594,630,668,

%U 704,744,784,826,866,906,950,996,1036,1072,1112,1162,1210,1262,1310,1364,1416,1472,1528,1586,1642,1702,1762

%N a(n) = A000982(n) - A132188(n).

%C a(n) = (number of pairs (i,j) in [1..n] X [1..n] with integral arithmetic mean) - (number of pairs (i,j) in [1..n] X [1..n] with integral geometric mean).

%H Alois P. Heinz, <a href="/A362934/b362934.txt">Table of n, a(n) for n = 1..10000</a>

%o (Python)

%o from sympy.ntheory.primetest import is_square

%o def A362934(n): return ((n-1)**2>>1)-(sum(1 for x in range(1,n+1) for y in range(1,x) if is_square(x*y))<<1) # _Chai Wah Wu_, Aug 29 2023

%Y Cf. A000982, A132188, A362931-A932937.

%K nonn

%O 1,3

%A _N. J. A. Sloane_, Aug 28 2023