login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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