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

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

%S 0,0,2,4,8,8,14,20,28,36,46,52,64,76,86,100,116,128,146,160,180,200,

%T 222,240,264,288,314,336,364,384,414,444,476,508,538,568,604,640,678,

%U 712,752,784,826,868,904,948,994,1036,1084,1132,1182,1232,1284,1332,1386,1436,1492,1548,1606,1652,1712

%N a(n) = A000982(n) - A362931(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 harmonic mean).

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

%o (Python)

%o def A362936(n): return ((n-1)**2>>1)-(sum(1 for x in range(1,n+1) for y in range(1,x) if not (x*y<<1)%(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