OFFSET
0,5
FORMULA
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
KEYWORD
AUTHOR
Peter Luschny, Oct 13 2024
STATUS
approved