login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A363394 Triangle read by rows. T(n, k) = A081658(n, k) + A363393(n, k) for k > 0 and T(n, 0) = 1. 0
1, 1, 1, 1, 2, -1, 1, 3, -3, -2, 1, 4, -6, -8, 5, 1, 5, -10, -20, 25, 16, 1, 6, -15, -40, 75, 96, -61, 1, 7, -21, -70, 175, 336, -427, -272, 1, 8, -28, -112, 350, 896, -1708, -2176, 1385, 1, 9, -36, -168, 630, 2016, -5124, -9792, 12465, 7936 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,5
LINKS
Richard P. Stanley, A survey of alternating permutations, arXiv:0912.4240 [math.CO], 2009.
FORMULA
|T(n, k)| = (-1)^(n - k) * n! * [x^(n - k)][y^n] (sec(y) + tan(y)) / exp(x*y).
T(n, k) = [x^(n - k)] -2^(k-(0^k))*(Euler(k, 0) + Euler(k, 1/2)) / (x-1)^(k + 1).
For a recursion see the Python program.
EXAMPLE
The triangle T(n, k) begins:
[0] 1;
[1] 1, 1;
[2] 1, 2, -1;
[3] 1, 3, -3, -2;
[4] 1, 4, -6, -8, 5;
[5] 1, 5, -10, -20, 25, 16;
[6] 1, 6, -15, -40, 75, 96, -61;
[7] 1, 7, -21, -70, 175, 336, -427, -272;
[8] 1, 8, -28, -112, 350, 896, -1708, -2176, 1385;
[9] 1, 9, -36, -168, 630, 2016, -5124, -9792, 12465, 7936;
MAPLE
# Variant, computes abs(T(n, k)):
P := n -> n!*coeff(series((sec(y) + tan(y))/exp(x*y), y, 24), y, n):
seq(print(seq((-1)^(n - k)*coeff(P(n), x, n - k), k = 0..n)), n = 0..9);
PROG
(Python)
from functools import cache
@cache
def T(n: int, k: int) -> int:
if k == 0: return 1
if k == n:
p = k % 2
return p - sum(T(n, j) for j in range(p, n - 1, 2))
return (T(n - 1, k) * n) // (n - k)
for n in range(10): print([T(n, k) for k in range(n + 1)])
CROSSREFS
Variants (row reversed): A109449, A247453.
Cf. A081658 (signed secant part), A363393 (signed tangent part), A000111 (main diagonal), A122045, A155585 (aerated main diagonal), A000667, A062162 (row sums of signless variant).
Sequence in context: A034929 A099509 A153859 * A368343 A131336 A052253
KEYWORD
sign,tabl
AUTHOR
Peter Luschny, Jun 06 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 3 20:21 EDT 2024. Contains 375675 sequences. (Running on oeis4.)