login
Number of ordered pairs (i, j) with i, j >= 0, i + j <= n and gcd(i, j) <= 1.
4

%I #17 Jul 09 2024 08:55:38

%S 1,3,4,6,8,12,14,20,24,30,34,44,48,60,66,74,82,98,104,122,130,142,152,

%T 174,182,202,214,232,244,272,280,310,326,346,362,386,398,434,452,476,

%U 492,532,544,586,606,630,652,698,714,756,776

%N Number of ordered pairs (i, j) with i, j >= 0, i + j <= n and gcd(i, j) <= 1.

%C This sequence is in reply to an extension request made in A100449.

%C Note that gcd(0,m) = m for any m.

%H Robert Price, <a href="/A225531/b225531.txt">Table of n, a(n) for n = 0..400</a>

%t f[n_] := Length[Complement[Union[Flatten[Table[If[i + j <= n && GCD[i, j] <= 1, {i, j}], {i, 0, n}, {j, 0, n}], 1]], {Null}]]; Table[f[n], {n, 0, 100}]

%o (PARI) alist(N) = my(c=2); vector(N, i, if(1==i, 1, c+=eulerphi(i-1))); \\ _Ruud H.G. van Tol_, Jul 09 2024

%Y Cf. A018805, A027430, A100448, A100449, A100450, A213207, A213208, A213212, A213213.

%K nonn,easy

%O 0,2

%A _Robert Price_, May 09 2013