OFFSET
1,4
LINKS
Indranil Ghosh, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = d(n)*E_n/(E_n + 1), where d(n) is the number of positive divisors of n and E_n is the exponent of the largest prime to divide n in the prime factorization of n.
EXAMPLE
The divisors of 12 which are themselves divisible by 3 (the largest prime dividing 12) are 3, 6 and 12. So the 12th term is 3.
MATHEMATICA
nd[n_]:=Module[{lp=FactorInteger[n][[-1, 1]]}, Count[Divisors[n], _?(Mod[ #, lp] == 0&)]]; Join[{0}, Array[nd, 100, 2]] (* Harvey P. Dale, May 05 2019 *)
a[n_] := Last[e = FactorInteger[n][[;; , 2]]]*Times @@ (1 + Most[e]); a[1] = 0; Array[a, 100] (* Amiram Eldar, Jul 09 2022 *)
PROG
(PARI) a(n) = if (n==1, 0, gp = vecmax(factor(n)[, 1]); sumdiv(n, d, ((d%gp) == 0))); \\ Michel Marcus, Feb 10 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Apr 08 2002
STATUS
approved