OFFSET
1,2
FORMULA
From Alois P. Heinz, Oct 01 2022: (Start)
a(n) = [x^n] x/(1-2*x-(n-1)*x^2).
a(n) = Sum_{j=0..floor(n/2)} n^j * binomial(n,2*j+1).
a(n) = A099173(n,n). (End)
MAPLE
b:= proc(n, k) option remember;
`if`(n<2, n, 2*b(n-1, k)+(k-1)*b(n-2, k))
end:
a:= n-> b(n$2):
seq(a(n), n=1..26); # Alois P. Heinz, Oct 01 2022
MATHEMATICA
Simplify[Table[((1 + Sqrt[n])^n - (1 - Sqrt[n])^n)/(2*Sqrt[n]), {n, 26}]] (* Stefano Spezia, Oct 03 2022 *)
PROG
(PARI) a(n) = polcoeff(lift( Mod('x, 'x^2-2*'x+1-n)^n ), 1); \\ Kevin Ryde, Oct 01 2022
(Python)
from sympy import simplify, sqrt
def A357502(n): return simplify(((1+sqrt(n))**n-(1-sqrt(n))**n)/sqrt(n))>>1 # Chai Wah Wu, Oct 14 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alexander R. Povolotsky, Oct 01 2022
STATUS
approved