OFFSET
1,3
COMMENTS
When writing n^(n-1) (A000169) as a sum of powers of n using the binomial theorem, one can separately sum the even and the odd powers of n. This is the even part.
FORMULA
a(n+1) = Sum_{k=0..floor(n/2)} n^(2k) binomial(n, 2k).
a(n+1) = ((1 - n)^n + (1 + n)^n)/2. - Stefano Spezia, Jun 21 2021
MATHEMATICA
Table[Plus @@ Table[(n-1)^(2 k) Binomial[n-1, 2 k], {k, 0, Floor[n/2]}], {n, 1, 21}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Olivier Gérard, Jun 21 2021
STATUS
approved