A339378 Let n be a positive integer. For each prime divisor p of n, consider the highest power of p which does not exceed n. The sum a(n) of these powers is defined as the power-sum of n.
0, 2, 3, 4, 5, 7, 7, 8, 9, 13, 11, 17, 13, 15, 14, 16, 17, 25, 19, 21, 16, 27, 23, 25, 25, 29, 27, 23, 29, 68, 31, 32, 38, 49, 32, 59, 37, 51, 40, 57, 41, 66, 43, 43, 52, 55, 47, 59, 49, 57, 44, 45, 53, 59, 36, 81, 46, 61, 59, 84, 61, 63, 76, 64, 38, 102, 67, 81
Offset: 1
Keywords
Examples
12 = 2^2 * 3^1; the highest power of 2 which does not exceed 12 is 2^3 and the highest power of 3 which does not exceed 12 is 3^2, hence a(12) = 2^3 + 3^2 = 2^(floor(log_2(12))) + 3^(floor(log_3(12))) = 17.
References
- J.-M. De Koninck & A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Ellipses, 2004, Problème 683, pp. 89 and 294.
Links
- Eötvös-Kürschák Competitions, Problem 2, 85th Eötvös-Kürschák Competition 1985.
- Index to sequences related to Olympiads and other Mathematical competitions.
Programs
-
Maple
pf := n -> NumberTheory:-PrimeFactors(n): a := n -> add(p^ilog[p](n), p in pf(n)): seq(a(n), n=1..68); # Peter Luschny, Dec 07 2020
-
Mathematica
f[n_, p_] := p^Floor[Log[p, n]]; a[1] = 0; a[n_] := Plus @@ (f[n, #] & /@ FactorInteger[n][[;; , 1]]); Array[a, 100] (* Amiram Eldar, Dec 06 2020 *)
-
PARI
a(n) = my(f=factor(n)); sum(k=1, #f~, my(p=f[k,1]); p^logint(n, p)); \\ Michel Marcus, Dec 06 2020
Formula
a(n) = Sum_{p | n} p^(floor(log_p(n))).
a(n) = n iff n = p^k , p prime, k >= 1 (A246655).
Comments