login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A139145
a(1) = 1, a(2*n) = a(n)^2, a(2*n+1) = a(n)*(a(n)+1).
2
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, 420, 1296, 1332, 1764, 1806, 1, 2, 4, 6, 16, 20, 36, 42, 256, 272, 400, 420, 1296, 1332, 1764, 1806, 65536, 65792, 73984, 74256, 160000, 160400, 176400, 176820, 1679616
OFFSET
1,3
FORMULA
a(2^n - 1) = A007018(n-1).
PROG
(Python)
from functools import lru_cache
@lru_cache(maxsize=None)
def A139145(n): return (m:=A139145(n>>1))*(m+(n&1)) if n>1 else 1 # Chai Wah Wu, Mar 19 2024
CROSSREFS
Cf. A007018.
Sequence in context: A214783 A360279 A284001 * A201635 A179787 A358918
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Apr 10 2008
STATUS
approved