editing
proposed
editing
proposed
a(n) is the n-th derivative of e^e^x divided by e at point x=0. - Joan Ludevid, Nov 05 2024
a(n) is the n-th derivative of e^e^x divided by e at point x=0. - Joan Ludevid, Nov 05 2024
proposed
editing
Array read by ascending antidiagonals: TA(n, k) = n^k*(GHZeta(k, n, 4) - GHZeta(k, n, 2))) where GHZeta(k, n, m) = m^(k+1)*HurwitzZeta(-k, 1/(m*n)) for n > 0, and T(0, k) = 1.
TA(n, k) = Im(P(n, k)) where P(n, k) = 2*i*(1 + Sum_{j=0..k} binomial(k, j)*polylog(-j, i)*n^j.
Array A(n, k) starts:
T A := (n, k) -> ifelse(n = 0, 1, n^k*(GHZeta(k, n, 4) - GHZeta(k, n, 2))):
for n from 0 to 7 do lprint(seq(TA(n, k), k = 0..7)) od;
P := proc(n, k) local j; 2*I*(1 + add(binomial(k, j)*polylog(-j, I)*n^j, j = 0..k)) end:
T A := n -> Im(P(n, k)): seq(lprint(seq(TA(n, k), k = 0..7)), n = 0..7);
TA[n_, k_] := n^k (4^(k+1) HurwitzZeta[-k, 1/(4n)] - 2^(k + 1) HurwitzZeta[-k, 1/(2n)]);
editing
approved
def eytzinger(n):
def e(t, k=1, i=0):
if (k < len(t)):
i = e(t, k * 2, i)
t[k] = i
i += 1
i = e(t, k * 2 + 1, i)
return i
t = [0] * (n+1)
e(t)
return t[1:]
major_index = lambda p: sum(i+1 for i in range(len(p)-1) if p[i] > p[i+1])
a = lambda n: major_index(eytzinger(n)) + 1
print([a(n) for n in range(0, 59)]) # Darío Clavijo, Nov 04 2024
(Python)
print([a(n) for n in range(0, 5967)]) # Darío Clavijo, Nov 05 2024
proposed
editing
(SageMath)
from mpmath import *
mp.dps = 32; mp.pretty = True
def EulerianPoly(k, n):
if x == 1: return k^n*factorial(n)
p = 2*I*(1+sum(binomial(n, j)*polylog(-j, I)*k^j for j in range(n+1)))
return int(imag(p))
for n in range(8): print([EulerianPoly(n, k) for k in range(7)])
[0] 1, 1, 1, 1, 1, 1, 1, 1, ... A000012
[1] 1, 0, -1, 0, 5, 0, -61, 0, ... A122045
[2] 1, -1, -3, 11, 57, -361, -2763, 24611, ... A212435
[3] 1, -2, -5, 46, 205, -3362, -22265, 515086, ... A225147
[4] 1, -3, -7, 117, 497, -15123, -95767, 4116837, ... A156201
[5] 1, -4, -9, 236, 981, -47524, -295029, 20208716, ... A377667A377665
[6] 1, -5, -11, 415, 1705, -120125, -737891, 73544935, ...
[7] 1, -6, -13, 666, 2717, -262086, -1599793, 218380506, ...
T(n, k) = Im(P(n, k)) where P(n, k) = 2*i*(1 + Sum_{j=0..k} binomial(k, j)*polylog(-j, i)*n^j.
# Alternative:
P := proc(n, k) local j; 2*I*(1+add(binomial(k, j)*polylog(-j, I)*n^j, j = 0..k)) end:
T := n -> Im(P(n, k)): seq(lprint(seq(T(n, k), k = 0..7)), n = 0..7);
Peter Luschny, <a href="https://oeis.org/wiki/User:Peter_Luschny/EulerianPolynomialsGeneralized#Assorted_values_of_the_polynomials
Peter Luschny, <a href="https://oeis.org/wiki/User:Peter_Luschny/EulerianPolynomialsGeneralized#Assorted_values_of_the_polynomials
Peter Luschny, <a href="http://oeis.org/wiki/https://oeis.org/wiki/User:Peter_Luschny