|
|
A059975
|
|
a(n) is the least number of prime factors (counted with multiplicity) of any integer with n divisors.
|
|
12
|
|
|
1, 2, 2, 4, 3, 6, 3, 4, 5, 10, 4, 12, 7, 6, 4, 16, 5, 18, 6, 8, 11, 22, 5, 8, 13, 6, 8, 28, 7, 30, 5, 12, 17, 10, 6, 36, 19, 14, 7, 40, 9, 42, 12, 8, 23, 46, 6, 12, 9, 18, 14, 52, 7, 14, 9, 20, 29, 58, 8, 60, 31, 10, 6, 16, 13, 66, 18, 24, 11, 70, 7, 72, 37, 10, 20, 16, 15, 78, 8, 8, 41
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,2
|
|
COMMENTS
|
n*a(n) is the number of complex multiplications needed for the fast Fourier transform of n numbers, writing n = r1 * r2 where r1 is a prime.
This sequence with offset 1,3 and a(1) = 0 is completely additive with a(p^e) = e*(p-1) for prime p and e >= 0. - Werner Schulte, Feb 23 2019
|
|
REFERENCES
|
Herbert S. Wilf, Algorithms and complexity, Internet Edition, Summer, 1994, p. 56.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = Sum ( e_i * (p_i - 1) ) where n = Product ( p_i^e_i ) is the canonical factorization of n.
|
|
EXAMPLE
|
a(18) = 5 since 18 = 2*3^2, a(18) = 1*(2-1) + 2*(3-1) = 5.
|
|
MAPLE
|
local a, pf, p, e ;
a := 0 ;
for pf in ifactors(n)[2] do
p := op(1, pf) ;
e := op(2, pf) ;
a := a+e*(p-1) ;
end do:
a ;
|
|
MATHEMATICA
|
Table[Total[(First /@ FactorInteger[n] - 1) Last /@ FactorInteger[n]], {n, 2, 100}] (* Danny Marmer, Nov 13 2014 - adapted to the offset by Vincenzo Librandi, Nov 13 2014 *)
f[p_, e_] := e*(p - 1); a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100, 2] (* Amiram Eldar, Mar 27 2023 *)
|
|
PROG
|
(PARI) a(n) = {my(f = factor(n)); sum(i = 1, #f~, f[i, 2]*(f[i, 1] - 1)); } \\ Amiram Eldar, Mar 27 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Yong Kong (ykong(AT)curagen.com), Mar 05 2001
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|