login
A324184
a(n) = sigma(A163511(n)).
10
1, 3, 7, 4, 15, 13, 12, 6, 31, 40, 39, 31, 28, 24, 18, 8, 63, 121, 120, 156, 91, 124, 93, 57, 60, 78, 72, 48, 42, 32, 24, 12, 127, 364, 363, 781, 280, 624, 468, 400, 195, 403, 372, 342, 217, 228, 171, 133, 124, 240, 234, 248, 168, 192, 144, 96, 90, 104, 96, 72, 56, 48, 36, 14, 255, 1093, 1092, 3906, 847, 3124, 2343, 2801, 600
OFFSET
0,2
FORMULA
a(n) = A000203(A163511(n)).
For n >= 1, a(n) = A324054(A054429(n)).
PROG
(PARI) A324184(n) = if(!n, 1, my(p=2, mp=p*p, m=1); while(n>1, if(n%2, p=nextprime(1+p); mp = p*p, if((2==n)||!(n%4), mp *= p, m *= (mp-1)/(p-1))); n >>= 1); (m*(mp-1)/(p-1)));
(PARI)
A163511(n) = if(!n, 1, my(p=2, t=1); while(n>1, if(!(n%2), (t*=p), p=nextprime(p+1)); n >>= 1); (t*p));
A324184(n) = sigma(A163511(n));
(Python)
from sympy import nextprime
def A324184(n):
if n:
c, p = 1, 1
while n:
c *= ((p:=nextprime(p))**(s:=(~n&n-1).bit_length()+1)-1)//(p-1)
n >>= s
return c*(p**(s+1)-1)//(p**s-1)
return 1 # Chai Wah Wu, Jul 25 2023
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 17 2019
STATUS
approved