OFFSET
1,2
COMMENTS
Basically a(n) measures the difference between the Euler factorial n! and the Luschny factorial L(n) at half-integer values. For the Luschny factorial see the link. The formula given in the Maple section is a variant of a formula given by Cyril Damamme in A135457. - Peter Luschny, Jul 18 2015
LINKS
FORMULA
a(n) = (-1)^n*(2*n-3)!!*(1 + (4*n-2)*Sum_{k=0..n-1} (-1)^(k+n)/(2*k+1)).
a(n) = (2*n-1)*a(n-1) + 2*(-1)^n*(2*n-5)!! with a(1) = 1.
a(n) = 4*a(n-1) + (4*n^2 - 16*n + 15)*a(n-2) with a(1) = 1 and a(2) = 5 [Superseeker].
0 = a(n)*a(n+1)*(-440*a(n+2) - 220*a(n+3) + 55*a(n+4)) + a(n)*a(n+2)*(536*a(n+2) - 118*a(n+3) - 4*a(n+4)) + a(n)*a(n+3)*(-4*a(n+3) + a(n+4)) + a(n+1)^2*(-220*a(n+2) - 32*a(n+3) + 8*a(n+4)) + a(n+1)*a(n+2)*(+71*a(n+2) + 4*a(n+3) - 2*a(n+4)) + a(n+2)^2*(-4*a(n+2) + a(n+3)) if n>0. - Michael Somos, Jul 19 2015
a(n) = (-1 + (n-1/2)*LerchPhi(-1,1,n+1/2) + (-n+1/2)*LerchPhi(-1,1,-n+1/2))/(1-2*n)!!. - Johannes W. Meijer, Jul 20 2015
a(n) = ((-1)^n/(2*n - 1) + Pi/2 - (-1)^n LerchPhi(-1, 1, n + 1/2)) (2*n - 1)!!. - Michael Somos, Jan 31 2019
EXAMPLE
G.f. = x + 5*x^2 + 23*x^3 + 167*x^4 + 1473*x^5 + 16413*x^6 + ...
MAPLE
L := x -> (1+x*(Psi(1-x/2)-Psi(1/2-x/2)))/(-x)!:
a := x -> (L(x-1/2)-(x-1/2)!)*2^(x-1)*sqrt(Pi):
seq(simplify(a(n)), n=1..18); # Peter Luschny, Jul 18 2015
a := proc(n) option remember: if n=1 then 1 else (2*n-1)*a(n-1)+2*(-1)^n*doublefactorial(2*n-5) fi: end: seq(a(n), n=1..18); # Johannes W. Meijer, Jul 20 2015
MATHEMATICA
a[ n_] := If[ n < 1, 0, (2 n - 3)!! ((-1)^n - I (4 n - 2) Sum[ I^k / k, {k, 1, 2 n - 1, 2}])]; (* Michael Somos, Jul 20 2015 *)
a[ n_] := If[ n < 1, 0, (2 n - 3)!! ((-1)^n + (4 n - 2) Sum[ KroneckerSymbol[ -4, k]/ k, {k, 2 n - 1}])]; (* Michael Somos, Jan 31 2019 *)
PROG
(PARI) {a(n) = if( n<1, 0, prod(k=1, n-1, 2*k - 1) * ((-1)^n - (4*n - 2) * sum(k=1, n, (-1)^k / (2*k - 1))))}; /* Michael Somos, Jul 20 2015 */
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Johannes W. Meijer, Nov 10 2009
STATUS
approved