login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A262718 a(n) = (n+1)^n - 2*(n^n) + (n-1)^n. 0

%I #24 Sep 08 2022 08:46:14

%S 0,0,2,18,194,2550,39962,730002,15257090,359376750,9424209002,

%T 272385029466,8604312602690,294957765448710,10906288759973882,

%U 432701819402940450,18336112083960655874,826578941145375829470,39497618599385891373002,1994276034034710498109674

%N a(n) = (n+1)^n - 2*(n^n) + (n-1)^n.

%C Obviously, a(n) is always an even number. - _Altug Alkan_, Sep 28 2015

%F E.g.f.: A(x) = B'(x)*(1-x/B(x))^2, where B(x) is g.f. of A000169.

%F a(n) = Sum{k=1..n} (k!*binomial(n-1,k-2)*stirling2(n,k)), n>0, a(0)=0.

%F a(n) = 2*(A062024(n) - A000312(n)). - _Michel Marcus_, Sep 28 2015

%t Join[{0}, Table[(n + 1)^n - 2 (n^n) + (n - 1)^n, {n, 30}]] (* _Vincenzo Librandi_, Sep 28 2015 *)

%o (Maxima)

%o B(x):=-lambert_w(-x);

%o makelist(n!*coeff(taylor(diff(B(x),x)*(1-x/B(x))^2,x,0,20),x,n),n,0,10);

%o (PARI) a(n) = (n+1)^n - 2*(n^n) + (n-1)^n;

%o vector(30, n, a(n-1)) \\ _Altug Alkan_, Sep 28 2015

%o (Magma) [(n+1)^n - 2*(n^n) + (n-1)^n: n in [0..30]]; // _Vincenzo Librandi_, Sep 28 2015

%Y Cf. A000169, A000312, A062024.

%K nonn,easy

%O 0,3

%A _Vladimir Kruchinin_, Sep 28 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 11:03 EDT 2024. Contains 371838 sequences. (Running on oeis4.)