login
a(n) = 0^n + 2((n+1)^n - (-1)^n) / (n+2).
0

%I #14 May 09 2021 06:21:46

%S 1,2,4,26,208,2222,29412,466034,8609344,181818182,4322904100,

%T 114308980106,3328297874640,105828636433886,3649115753173828,

%U 135637824071393762,5406799097296318720,230095953656704898102

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

%F a(n) = P(n, n-2, n) where P(n, m, z) = Product_{j=0..n-1} (z - Sum_{k=1..m} e^(j*k*2*Pi*I/n)), I=sqrt(-1).

%p seq(0^n + 2*((n+1)^n-(-1)^n)/(n+2),n=0..20); # _Georg Fischer_, May 08 2021

%t P[n_,m_,z_]:= Product[z - Sum[E^(j*k*2*pi*I/n), {k,1,m}], {j,0,n-1}];

%t Table[FullSimplify[P[n,n-2,n]], {n,0,12}] (* _Georg Fischer_, May 08 2021 *)

%o (PARI) a(n) = 0^n + 2*((n+1)^n - (-1)^n) / (n+2); \\ _Michel Marcus_, May 09 2021

%Y Cf. A083063.

%K easy,nonn

%O 0,2

%A _Paul Barry_, Feb 03 2004