|
|
A077386
|
|
Sums of rows of triangle in A077385.
|
|
2
|
|
|
1, 4, 17, 106, 937, 10886, 156865, 2696338, 53808401, 1222222222, 31124909521, 878100801722, 27181099309561, 915824738370166, 33363344029017857, 1306644371887759906, 54743840860125227041, 2443077625590307888670, 115697055886568046147601
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = {n^n + n^(n-1) -2}/(n-1), for n>1.
E.g.f.: 2*x*Ei(-W(-x)) - 2*x*Ei(x) + W(-x) + 2*exp(x) - 2, where Ei(x) is the exponential integral and W(x) is the Lambert W function. - G. C. Greubel, Sep 21 2022
|
|
MATHEMATICA
|
Table[If[n==1, 1, (n^n +n^(n-1) -2)/(n-1)], {n, 30}] (* G. C. Greubel, Sep 21 2022 *)
|
|
PROG
|
(PARI) a(n) = sum(k=0, n-1, n^k) + sum(k=0, n-2, n^k); \\ Michel Marcus, Feb 03 2014
(Magma) [1] cat [(n^n +n^(n-1) -2)/(n-1): n in [2..30]]; // G. C. Greubel, Sep 21 2022
(SageMath)
def A077386(n): return 1 if (n==1) else (n^n +n^(n-1) -2)/(n-1)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|