OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..475
MATHEMATICA
A064094[n_, k_]:= If[k==0 || k==n, 1, Sum[(n-k-j)*Binomial[n-k-1+j, j]*k^j, {j, 0, n-k-1}]/(n-k) ];
Table[A064095[n], {n, 0, 30}] (* G. C. Greubel, Sep 27 2024 *)
PROG
(PARI)
T(n, k)= if (n==k, 1, sum(i=0, n-k-1, (n-k-i)*binomial(n-k-1+i, i)*(k^i)/(n-k))); \\ A064094
a(n) = sum(k=0, n, T(n, k));
(Magma)
function A064094(n, k)
if k eq 0 or k eq n then return 1;
else return (&+[(n-k-j)*Binomial(n-k-1+j, j)*k^j: j in [0..n-k-1]])/(n-k);
end if;
end function;
[A064095(n): n in [0..30]]; // G. C. Greubel, Sep 27 2024
(SageMath)
def A064094(n, k):
if (k==0 or k==n): return 1
else: return sum((n-k-j)*binomial(n-k-1+j, j)*k^j for j in range(n-k))//(n-k)
[A064095(n) for n in range(31)] # G. C. Greubel, Sep 27 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, Sep 13 2001
EXTENSIONS
More terms from Michel Marcus, Oct 28 2022
STATUS
approved