Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #11 Nov 13 2024 01:54:11
%S 1,1,1,1,4,4,2,9,27,27,5,32,96,256,256,16,125,500,1250,3125,3125,61,
%T 576,2700,8640,19440,46656,46656,272,2989,16464,60025,168070,352947,
%U 823543,823543,1385,17408,109312,458752,1433600,3670016,7340032,16777216,16777216
%N Triangle read by rows: T(n, k) = n^k * n! * [x^k][y^n]((sec(y) + tan(y)) * exp(x*y)).
%F 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.
%F T(n, k) = n^k*A109449(n, k) = n^k*binomial(n, k)*A000111(n - k).
%e Triangle starts:
%e [0] 1;
%e [1] 1, 1;
%e [2] 1, 4, 4;
%e [3] 2, 9, 27, 27;
%e [4] 5, 32, 96, 256, 256;
%e [5] 16, 125, 500, 1250, 3125, 3125;
%e [6] 61, 576, 2700, 8640, 19440, 46656, 46656;
%e [7] 272, 2989, 16464, 60025, 168070, 352947, 823543, 823543;
%e [8] 1385, 17408, 109312, 458752, 1433600, 3670016, 7340032, 16777216, 16777216;
%p P := n -> coeff(series((sec(y) + tan(y)) * exp(x*y), y, 12), y, n):
%p seq(seq(coeff(P(n), x, k) * n^k * n!, k = 0..n), n = 0..8);
%p 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))):
%p seq(print([n], seq(T(n, k), k = 0..n)), n = 0..8);
%o (Python)
%o from math import comb, isqrt
%o from sympy import bernoulli, euler
%o def A000111(n): return abs(((1<<n+1)-1<<n+1)*bernoulli(n+1)//(n+1) if n&1 else euler(n))
%o 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
%Y Cf. A000111, A000312, A079901, A109449, A292976 (row sums).
%K nonn,tabl
%O 0,5
%A _Peter Luschny_, Oct 13 2024