login
A162943
a(n) = 2^(1-A002321(n)).
2
1, 2, 4, 4, 8, 4, 8, 8, 8, 4, 8, 8, 16, 8, 4, 4, 8, 8, 16, 16, 8, 4, 8, 8, 8, 4, 4, 4, 8, 16, 32, 32, 16, 8, 4, 4, 8, 4, 2, 2, 4, 8, 16, 16, 16, 8, 16, 16, 16, 16, 8, 8, 16, 16, 8, 8, 4, 2, 4, 4, 8, 4, 4, 4, 2, 4, 8, 8, 4, 8, 16, 16, 32, 16, 16, 16, 8
OFFSET
1,2
PROG
(Python)
from functools import lru_cache
@lru_cache(maxsize=None)
def A162943(n):
if n == 0:
return 2
c, j = n, 2
k1 = n//j
while k1 > 1:
j2 = n//k1 + 1
c += (j2-j)*(4-len(bin(A162943(k1))))
j, k1 = j2, n//j2
return 2**(1+c-j) # Chai Wah Wu, Mar 30 2021
CROSSREFS
Cf. A002321, first column of A162944.
Sequence in context: A055077 A117215 A011173 * A131136 A117973 A347191
KEYWORD
nonn
AUTHOR
Mats Granvik, Jul 18 2009
STATUS
approved