OFFSET
1,1
COMMENTS
LINKS
FORMULA
PROG
(PARI)
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
A156552(n) = { my(f = factor(n), p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res };
(Python)
from math import prod
from itertools import accumulate
from collections import Counter
from sympy import prime, primepi, factorint
def A329603(n): return prod(prime(len(a)+1)**b for a, b in Counter(accumulate(bin(1+3*sum((1<<primepi(p)-1)<<i for i, p in enumerate(factorint(n, multiple=True))))[2:].split('1')[:0:-1])).items()) # Chai Wah Wu, Mar 11 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 21 2019
EXTENSIONS
New primary definition added by Antti Karttunen, Feb 14 2021
STATUS
approved