login
A372357
Array read by upward antidiagonals: A(n, k) = A372356(1+n,k)-2*A372356(n,k), n,k >= 1.
3
0, 0, 2, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, -1, 1, 0, 0, 0, 3, -1, -1, 0, 0, 0, 2, -1, 3, 2, 0, 0, 0, 0, 3, 2, 0, -1, 0, 0, 0, 0, 2, 0, 0, -2, 3, 0, 0, 0, 0, 0, 0, 0, 5, 2, 3, 0, 0, 0, 0, 0, 0, 0, 2, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 5, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 3, -1
OFFSET
1,3
EXAMPLE
Array begins:
n\k| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
---+-----------------------------------------------------------------------------
1 | 0, 2, 0, -1, 1, -1, 2, -1, 3, 3, 0, -2, -2, -1, -1, -1, 2, 5, 1, 1, 1,
2 | 0, 0, 0, -1, -1, 3, 0, -2, 2, -1, 0, 5, 3, 1, -1, -2, -2, 2, -1, 0, -1,
3 | 0, 0, 0, 3, -1, 2, 0, 5, 0, -1, 0, 2, -1, -1, 3, 1, 3, 0, -1, -2, -2,
4 | 0, 0, 0, 2, 3, 0, 0, 2, 0, 3, 0, 0, -1, -2, 2, -1, -1, 0, 3, 4, 1,
5 | 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 3, 1, 0, 2, -1, 0, 2, -2, -1,
6 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -1, 0, -1, 3, 0, 0, 3, 2,
7 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, -1, 2, 0, 0, -1, -1,
8 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, -1, -1,
9 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -2, 0, 0, 0, 3, 1,
10 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 2, -2,
11 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, -1, 0, 0, 0, 0, 2,
12 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0, -1,
13 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, -2,
14 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, -1, 0, 0, 0, 0, 1,
15 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, -1,
16 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -2, 0, 0, 0, 0, 3,
17 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 0, 0, 0, 0, -2,
18 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 1,
19 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -2, 0, 0, 0, 0, 0,
20 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, -2,
21 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, -2, 0, 0, 0, 0, 2,
PROG
(PARI)
up_to = 105;
A000523(n) = logint(n, 2);
A371094(n) = { my(m=1+3*n, e=valuation(m, 2)); ((m*(2^e)) + (((4^e)-1)/3)); };
A372282sq(n, k) = if(1==n, 2*k-1, A371094(A372282sq(n-1, k)));
A372356sq(n, k) = { my(x=A372282sq(n, k)); (A000523(A371094(x))-A000523(x)); };
A372357sq(n, k) = (A372356sq(1+n, k)-2*A372356sq(n, k));
A372357sq(n, k) = { my(x=A372282sq(n, k), y=A371094(x), z=A371094(y), xl=A000523(x), yl=A000523(y), zl=A000523(z)); ((zl-yl) - 2*(yl-xl)); };
A372357sq(n, k) = { my(x=A372282sq(n, k), y=A371094(x), z=A371094(y), xl=A000523(x), yl=A000523(y), zl=A000523(z)); (zl - 3*yl + 2*xl); };
A372357list(up_to) = { my(v = vector(up_to), i=0); for(a=1, oo, for(col=1, a, i++; if(i > up_to, return(v)); v[i] = A372357sq((a-(col-1)), col))); (v); };
v372357 = A372357list(up_to);
A372357(n) = v372357[n];
CROSSREFS
KEYWORD
sign,tabl
AUTHOR
Antti Karttunen, Apr 30 2024
STATUS
approved