OFFSET
1,14
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
MATHEMATICA
f[2, e_] := 2^(e + 1) - 1; f[p_, e_] := p^e - 1; a[1] = 1; a[n_] := Times @@ (fct = f @@@ FactorInteger[n])/LCM @@ fct; Array[a, 100] (* Amiram Eldar, Jun 03 2021 *)
PROG
(PARI)
A344875(n) = { my(f=factor(n)~); prod(i=1, #f, (f[1, i]^(f[2, i]+(2==f[1, i]))-1)); };
A344878(n) = if(1==n, n, my(f=factor(n)~); lcm(vector(#f, i, (f[1, i]^(f[2, i]+(2==f[1, i]))-1))));
(Python)
from math import prod, lcm
from sympy import factorint
def A344879(n): return prod(a := tuple(p**(e+int(p==2))-1 for p, e in factorint(n).items()))//lcm(*a) # Chai Wah Wu, Jun 15 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 03 2021
STATUS
approved