OFFSET
1,2
COMMENTS
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = (2^((p_1)^(e_1)) - 1) * ... * (2^((p_k)^(e_k)) - 1) where (p_1)^(e_1) * ... * (p_k)^(e_k) is the prime factorization of n.
EXAMPLE
a(6) = (2^2 - 1) * (2^3 - 1) = 21 since 6 = 2 * 3.
MAPLE
a:= n-> mul(2^(i[1]^i[2])-1, i=ifactors(n)[2]):
seq(a(n), n=1..50); # Alois P. Heinz, Jun 09 2014
MATHEMATICA
a[n_] := Times @@ (2^(Power @@@ FactorInteger[n]) - 1); Array[a, 40] (* Amiram Eldar, Aug 31 2023 *)
PROG
(PARI) a(n) = my(f=factor(n)); for (i=1, #f~, f[i, 1] = 2^(f[i, 1]^f[i, 2])-1; f[i, 2]=1); factorback(f); \\ Michel Marcus, Jun 09 2014
CROSSREFS
KEYWORD
mult,easy,nonn
AUTHOR
Jens Voß, Sep 04 2001
EXTENSIONS
More terms from Michel Marcus, Jun 09 2014
STATUS
approved