OFFSET
1,2
LINKS
Matthias Butterweck, Table of n, a(n) for n = 1..3322
FORMULA
Sum_{n>=1} 1/a(n) = Product_{m>=1} (1 + Sum_{k>=1} 1/prime(k)^prime(m)) = Product_{m>=1} (1 + P(prime(m))) = 1.78279963787539257806..., where P(s) is the prime zeta function. - Amiram Eldar, Sep 14 2023, Oct 24 2023
EXAMPLE
For n = 12288 = 2^12 * 3^1 one gets a(12288) = prime(12)^2 * prime(1)^3 = 37^2 * 2^3 = 10952 (12288 is the smallest n > a(n) that is not a power of 2).
MATHEMATICA
f[p_, e_] := Prime[e]^p; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 42] (* Amiram Eldar, Sep 14 2023 *)
PROG
(Python)
from functools import reduce
from operator import mul
from sympy import factorint, prime
def a(n):
return 1 if n == 1 else reduce(mul, (prime(k)**p for p, k in factorint(n).items()))
(PARI) a(n) = my(f=factor(n)); for (k=1, #f~, my(p = f[k, 1]); f[k, 1] = prime(f[k, 2]); f[k, 2] = p); factorback(f); \\ Michel Marcus, Mar 16 2019
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Matthias Butterweck, Mar 16 2019
EXTENSIONS
Keyword mult added by Rémy Sigrist, Mar 17 2019
STATUS
approved
