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

A376878
Triangle read by rows: T(n, k) = n^k * n! * [x^k][y^n]((sec(y) + tan(y)) * exp(x*y)).
1
1, 1, 1, 1, 4, 4, 2, 9, 27, 27, 5, 32, 96, 256, 256, 16, 125, 500, 1250, 3125, 3125, 61, 576, 2700, 8640, 19440, 46656, 46656, 272, 2989, 16464, 60025, 168070, 352947, 823543, 823543, 1385, 17408, 109312, 458752, 1433600, 3670016, 7340032, 16777216, 16777216
OFFSET
0,5
FORMULA
T(n, k) = (-1)^binomial(n-k, 2)*n^k*binomial(n, k)*(Euler(n-k) - Euler(n-k, 0)*2^(n - k))) for 0 <= k < n and n^n for n = k.
T(n, k) = n^k*A109449(n, k) = n^k*binomial(n, k)*A000111(n - k).
EXAMPLE
Triangle starts:
[0] 1;
[1] 1, 1;
[2] 1, 4, 4;
[3] 2, 9, 27, 27;
[4] 5, 32, 96, 256, 256;
[5] 16, 125, 500, 1250, 3125, 3125;
[6] 61, 576, 2700, 8640, 19440, 46656, 46656;
[7] 272, 2989, 16464, 60025, 168070, 352947, 823543, 823543;
[8] 1385, 17408, 109312, 458752, 1433600, 3670016, 7340032, 16777216, 16777216;
MAPLE
P := n -> coeff(series((sec(y) + tan(y)) * exp(x*y), y, 12), y, n):
seq(seq(coeff(P(n), x, k) * n^k * n!, k = 0..n), n = 0..8);
T := (n, k) -> ifelse(n = k, n^n, (-1)^binomial(n - k, 2)*n^k*binomial(n, k)*(euler(n - k) - euler(n - k, 0)*2^(n - k))):
seq(print([n], seq(T(n, k), k = 0..n)), n = 0..8);
PROG
(Python)
from math import comb, isqrt
from sympy import bernoulli, euler
def A000111(n): return abs(((1<<n+1)-1<<n+1)*bernoulli(n+1)//(n+1) if n&1 else euler(n))
def A376878(n): return comb(a:=(m:=isqrt(k:=n+1<<1))-(k<=m*(m+1)), b:=n-comb(a+1, 2))*a**b*A000111(a-b) # Chai Wah Wu, Nov 13 2024
CROSSREFS
Cf. A000111, A000312, A079901, A109449, A292976 (row sums).
Sequence in context: A202322 A365797 A232523 * A224821 A034933 A320148
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, Oct 13 2024
STATUS
approved