cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Apr 10 2008

Keywords

Crossrefs

Cf. A007018.

Programs

  • 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

Formula

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