login
a(1) = 1, a(2*n) = a(n)^2, a(2*n+1) = a(n)*(a(n)+1).
2

%I #8 Mar 19 2024 13:01:43

%S 1,1,2,1,2,4,6,1,2,4,6,16,20,36,42,1,2,4,6,16,20,36,42,256,272,400,

%T 420,1296,1332,1764,1806,1,2,4,6,16,20,36,42,256,272,400,420,1296,

%U 1332,1764,1806,65536,65792,73984,74256,160000,160400,176400,176820,1679616

%N a(1) = 1, a(2*n) = a(n)^2, a(2*n+1) = a(n)*(a(n)+1).

%F a(2^n - 1) = A007018(n-1).

%o (Python)

%o from functools import lru_cache

%o @lru_cache(maxsize=None)

%o def A139145(n): return (m:=A139145(n>>1))*(m+(n&1)) if n>1 else 1 # _Chai Wah Wu_, Mar 19 2024

%Y Cf. A007018.

%K nonn

%O 1,3

%A _Reinhard Zumkeller_, Apr 10 2008