login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
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)
[A077386(n) for n in (1..30)] # G. C. Greubel, Sep 21 2022
CROSSREFS
Cf. A077385.
Sequence in context: A335626 A232211 A122940 * A209903 A330514 A330535
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Nov 06 2002
EXTENSIONS
More terms from Michel Marcus, Feb 03 2014
STATUS
approved