OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
MATHEMATICA
udiv[n_] := Select[Divisors[n], GCD[#, n/#]==1 &]; a[n_] := Module[{d = udiv[n]}, Sum[Length[Intersection[d, udiv[k]]], {k, 1, n}]]; Array[a, 100] (* Amiram Eldar, Aug 10 2019 *)
PROG
(PARI) a(n) = {sdivn = Set(); fordiv(n, d, if (gcd(d, n/d) == 1, sdivn = setunion(sdivn, Set(d)))); s = 0; for (m=1, n, sdivm = Set(); fordiv(m, d, if (gcd(d, m/d) == 1, sdivm = setunion(sdivm, Set(d)))); s += length(setintersect(sdivn, sdivm)); ); return (s); } \\ Michel Marcus, Jul 15 2013
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Naohiro Nomoto, Jan 11 2004
STATUS
approved