OFFSET
1,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..20000
FORMULA
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = 1/zeta(2)^2 + Sum_{k>=3} (1/zeta(k+1) - 1/zeta(k))^2 = 0.43029326822775728041... . - Amiram Eldar, Jan 05 2024
MAPLE
f:= proc(n) option remember; `if`(n=1, 0,
max(map(i-> i[2], ifactors(n)[2])))
end:
b:= proc(n) option remember; `if`(n<1, 0, b(n-1)+x^f(n)) end:
a:= n-> coeff(b(n), x, f(n)):
seq(a(n), n=1..80); # Alois P. Heinz, Sep 23 2022
MATHEMATICA
Table[Length[Select[Range[n], If[# == 1, 0, Max @@ Last /@ FactorInteger[#]] == If[n == 1, 0, Max @@ Last /@ FactorInteger[n]] &]], {n, 1, 80}]
seq[max_] := Module[{e = Join[{0}, Table[Max @@ FactorInteger[n][[;; , 2]], {n, 2, max}]], c = Table[0, {max}]}, Do[c[[k]] = 1 + Count[e[[1 ;; k - 1]], e[[k]]], {k, 1, max}]; c]; seq[100] (* Amiram Eldar, Jan 05 2024 *)
PROG
(PARI) lista(nmax) = {my(e = vector(nmax, k, if(k==1, 0, vecmax(factor(k)[, 2]))), c); for(k = 1, nmax, c = 1; for(j = 1, k-1, c += (e[j] == e[k])); print1(c, ", ")); } \\ Amiram Eldar, Jan 05 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Sep 23 2022
STATUS
approved