OFFSET
0,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..400
FORMULA
E.g.f.: (1/sqrt(2))*sin(sqrt(2)*(1-sqrt(1-2*x))).
a(n) ~ cos(sqrt(2)) * 2^(n - 1/2) * n^(n-1) / exp(n). - Vaclav Kotesovec, Mar 13 2020
MAPLE
a:= proc(n) option remember; `if`(n<2, n,
(2*n-3)*a(n-1)-2*a(n-2))
end:
seq(a(n), n=0..25); # Alois P. Heinz, Apr 10 2015
MATHEMATICA
RecurrenceTable[{a[0]==a[1]==1, a[n+2]==(2n+1)a[n+1]-2a[n]}, a, {n, 20}]
a[n_]:=(2n-3)*a[n-1]-2a[n-2]; a[0]=0; a[1]=1; Array[a, 21, 0] (* or *)
Range[0, 20]! CoefficientList[ Simplify[ Series[ Sin[ Sqrt[2]*(1 - Sqrt[1 - 2 x])]/Sqrt[2], {x, 0, 20}]], x]
(* Robert G. Wilson v, Apr 08 2015 *)
nxt[{n_, a_, b_}]:={n+1, b, b*(2n-1)-2a}; NestList[nxt, {1, 0, 1}, 30][[All, 2]] (* Harvey P. Dale, Jun 21 2020 *)
PROG
(Magma) [0] cat [n le 2 select 1 else (2*n-3)*Self(n-1)-2*Self(n-2): n in [1..50]]; // Vincenzo Librandi, Apr 09 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
G. C. Greubel, Apr 08 2015
STATUS
approved