OFFSET
0,4
FORMULA
O.g.f.: (1 - 2*z)*2*sin(arcsin(sqrt(27*z)/2)/3)/sqrt(3*z). [This is due to Emeric Deutsch.]
D-finite with recurrence 2*n*(2*n+1)*a(n) +(-43*n^2+67*n-18)*a(n-1) +4*(31*n^2-130*n+117)*a(n-2) -12*(3*n-10)*(3*n-11)*a(n-3)=0. - R. J. Mathar, Mar 06 2022
MAPLE
# Recurrence:
a := proc(n) option remember; if n < 4 then return [1, -1, 1, 6][n+1] fi;
-((-108*n^2 + 756*n - 1320)*a(n - 3) + (124*n^2 - 520*n + 468)*a(n - 2) + (-43*n^2 + 67*n - 18)*a(n - 1)) / (4*n^2 + 2*n) end:
seq(a(n), n=0..26); # Peter Luschny, Aug 09 2020
alias(PS=ListTools:-PartialSums): A336945List := proc(m) local A, P, n;
A := [1, -1, 1]; P := [1, 1]; for n from 1 to m - 2 do P := PS(PS([op(P), P[-1]]));
A := [op(A), P[-1]] od; A end: A336945List(26); # Peter Luschny, Mar 26 2022
MATHEMATICA
a[n_] := Binomial[3*n, n]/(2*n + 1) - 2 * Binomial[3*(n - 1), n - 1]/(2*n - 1); Array[a, 27, 0] (* Amiram Eldar, Aug 08 2020 *)
PROG
(PARI) a(n) = if (n!=0, binomial(3*n, n)/(2*n + 1) - 2*binomial(3*(n - 1), n - 1)/(2*n - 1), 1); \\ Michel Marcus, Aug 09 2020
CROSSREFS
KEYWORD
sign
AUTHOR
Petros Hadjicostas, Aug 08 2020
STATUS
approved