OFFSET
1,3
COMMENTS
Both ratios are multiplicative because the constituent sequences are.
LINKS
FORMULA
MATHEMATICA
Array[#2/GCD[##] & @@ {DivisorSigma[1, #], If[# == 1, 1, Times @@ Map[NextPrime[#1]^#2 & @@ # &, FactorInteger[#]]]} &, 79] (* Michael De Vlieger, Nov 11 2021 *)
PROG
(PARI)
A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
(Python)
from math import prod, gcd
from sympy import nextprime, factorint
def A349161(n):
f = factorint(n).items()
a = prod(nextprime(p)**e for p, e in f)
b = prod((p**(e+1)-1)//(p-1) for p, e in f)
return a//gcd(a, b) # Chai Wah Wu, Mar 17 2023
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
Antti Karttunen, Nov 09 2021
STATUS
approved