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”).

A357502
a(n) = ((1 + sqrt(n))^n - (1 - sqrt(n))^n)/(2*sqrt(n)).
3
1, 2, 6, 20, 80, 342, 1624, 8136, 43776, 246410, 1463264, 9033180, 58200064, 387905182, 2679200640, 19068105488, 139929124864, 1054773505170, 8167509816832, 64795371984420, 526534098026496, 4374163243287398, 37135913476691968, 321727849480560600
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
Main diagonal of A099173.
Sequence in context: A150184 A150185 A354737 * A187009 A144168 A177482
KEYWORD
nonn,easy
AUTHOR
STATUS
approved