A357310 a(n) is the number of j in the range 1 <= j <= n with the same maximal exponent in prime factorization as n.
1, 1, 2, 1, 3, 4, 5, 1, 2, 6, 7, 3, 8, 9, 10, 1, 11, 4, 12, 5, 13, 14, 15, 2, 6, 16, 3, 7, 17, 18, 19, 1, 20, 21, 22, 8, 23, 24, 25, 4, 26, 27, 28, 9, 10, 29, 30, 2, 11, 12, 31, 13, 32, 5, 33, 6, 34, 35, 36, 14, 37, 38, 15, 1, 39, 40, 41, 16, 42, 43, 44, 7, 45, 46, 17, 18, 47, 48, 49, 3
Offset: 1
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..20000
Programs
-
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 *)
-
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
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