login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A115359
Matrix (1,x)-(x,x^2) in Riordan array notation.
12
1, -1, 1, 0, 0, 1, 0, -1, 0, 1, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
OFFSET
0,1
FORMULA
Number triangle T(n, k)=if(n=k, 1, 0) OR if(n=2k+1, -1, 0).
a(n) = A010054(n) - A379480(n). [As a flat sequence with starting offset 1] - Antti Karttunen, Jan 19 2025
EXAMPLE
Triangle begins:
n\k| 0 1 2 3 4 5 6 7 8 9
---+-----------------------------------------
0 | 1;
1 | -1, 1;
2 | 0, 0, 1;
3 | 0, -1, 0, 1;
4 | 0, 0, 0, 0, 1;
5 | 0, 0, -1, 0, 0, 1;
6 | 0, 0, 0, 0, 0, 0, 1;
7 | 0, 0, 0, -1, 0, 0, 0, 1;
8 | 0, 0, 0, 0, 0, 0, 0, 0, 1;
9 | 0, 0, 0, 0, -1, 0, 0, 0, 0, 1;
etc. Row and column numbering added by Antti Karttunen, Jan 19 2025
PROG
(PARI) tabl(nn) = {T = matrix(nn, nn, n, k, n--; k--; if ((n==k), 1, if (n==2*k+1, -1, 0))); for (n=1, nn, for (k=1, n, print1(T[n, k], ", "); ); print(); ); } \\ Michel Marcus, Mar 28 2015
(PARI)
A115359off1(n) = (ispolygonal(n, 3)-(!(n%2) && issquare(n/2))); \\ (This is one-based)
A115359(n) = A115359off1(1+n); \\ (zero-based) - Antti Karttunen, Jan 19 2025
CROSSREFS
Row sums are 1,0,1,0,1,0... (A059841), Diagonal sums are A115360. Inverse is A115361.
Cf. also A115356.
Sequence in context: A256538 A074910 A115356 * A117906 A090678 A110037
KEYWORD
easy,sign,tabl,changed
AUTHOR
Paul Barry, Jan 21 2006
STATUS
approved