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”).

A162459
1
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,3
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.
FORMULA
a(n) = 2^(n-1)*A002321(n). - Chai Wah Wu, Mar 30 2021
PROG
(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
CROSSREFS
Sequence in context: A149092 A188117 A094502 * A129195 A180098 A124143
KEYWORD
sign
AUTHOR
Mats Granvik, Jul 04 2009
STATUS
approved