OFFSET
1,4
LINKS
Michel Lagneau, Table of n, a(n) for n = 1..10000
MAPLE
f:= proc(n) local p;
p:= max(numtheory:-factorset(n));
add(padic:-ordp(k, p), k=1..n);
end proc:
1, seq(f(n), n=2..1000); # Robert Israel, Dec 23 2014
MATHEMATICA
a[1] = 1; a[n_] := With[{p = FactorInteger[n][[-1, 1]]}, IntegerExponent[ Range[n], p] // Total]; Array[a, 100] (* Jean-François Alcover, Mar 09 2019 *)
PROG
(PARI) a(n) = if (n==1, 1, my(p = vecmax(factor(n)[, 1])); sum(i=1, n, valuation(i, p))); \\ Michel Marcus, Dec 23 2014, Mar 09 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Dec 12 2002
STATUS
approved