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.

A162459 A002321*A000079.

Original entry on oeis.org

1, 0, -4, -8, -32, -32, -128, -256, -512, -512, -2048, -4096, -12288, -16384, -16384, -32768, -131072, -262144, -786432, -1572864, -2097152, -2097152, -8388608, -16777216, -33554432, -33554432, -67108864, -134217728, -536870912, -1610612736, -4294967296
Offset: 1

Views

Author

Mats Granvik, Jul 04 2009

Keywords

Comments

Appears to be the determinant of n X n (-1,1) matrix defined by A(i,j)=1 if j=1 or i divides j else -1.
Appears also to be the determinant of n X n (-i/j,i/j) matrix defined by A(i,j)=i/j if j=1 or i divides j else -i/j.

Crossrefs

Programs

  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A162459(n):
        if n == 0:
            return 0
        c, j = n, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c += (j2-j)*A162459(k1)//2**(k1-1)
            j, k1 = j2, n//j2
        return 2**(n-1)*(j-c) # Chai Wah Wu, Mar 30 2021

Formula

a(n) = 2^(n-1)*A002321(n). - Chai Wah Wu, Mar 30 2021