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
KEYWORD
nonn
AUTHOR
Mats Granvik, Jul 18 2009
STATUS
approved