A077386 Sums of rows of triangle in A077385.
1, 4, 17, 106, 937, 10886, 156865, 2696338, 53808401, 1222222222, 31124909521, 878100801722, 27181099309561, 915824738370166, 33363344029017857, 1306644371887759906, 54743840860125227041, 2443077625590307888670, 115697055886568046147601
Offset: 1
Keywords
Links
- G. C. Greubel, Table of n, a(n) for n = 1..385
Crossrefs
Cf. A077385.
Programs
-
Magma
[1] cat [(n^n +n^(n-1) -2)/(n-1): n in [2..30]]; // 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 *)
-
PARI
a(n) = sum(k=0, n-1, n^k) + sum(k=0, n-2, n^k); \\ Michel Marcus, Feb 03 2014
-
SageMath
def A077386(n): return 1 if (n==1) else (n^n +n^(n-1) -2)/(n-1) [A077386(n) for n in (1..30)] # G. C. Greubel, Sep 21 2022
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
Extensions
More terms from Michel Marcus, Feb 03 2014