OFFSET
1,3
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Hamid Kulosman, The number of equivalence classes of the relation lcm(x,n) = lcm(y,n) on the set {1,2,...,n}, Rad. Mat. 7 (1991), pp. 143-150.
FORMULA
h(n) = symb floor(prod_{i=1..k} (p_i^a_i - p_i^(a_i-1) + 1/p_i), where n=p_1^a_1 * ... * p_k^a_k and the symbol symb symbolizes that first the multiplication of all factors is performed and then floor is assigned to each of the 3^k terms, keeping the sign of the term outside (this symbol is occurring in W. Sierpinski's 1950 monograph Number Theory).
MATHEMATICA
a[n_] := Length @ Union @ Table[LCM[n, i], {i, 1, n}]; Array[a, 100] (* Amiram Eldar, Apr 23 2020 *)
PROG
(PARI) a(n)=#Set(vector(n, i, lcm(n, i))) \\ Charles R Greathouse IV, Dec 19 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
Hamid Kulosman, Dec 19 2011
STATUS
approved