login
a(n) = numerator(n!! / (n - 1)!!).
3

%I #27 Feb 11 2025 07:13:35

%S 1,1,2,3,8,15,16,35,128,315,256,693,1024,3003,2048,6435,32768,109395,

%T 65536,230945,262144,969969,524288,2028117,4194304,16900975,8388608,

%U 35102025,33554432,145422675,67108864,300540195,2147483648,9917826435,4294967296,20419054425

%N a(n) = numerator(n!! / (n - 1)!!).

%C Perhaps surprisingly, the double factorial is also defined for n = -1. The reason for this is that (-1/2)! is well defined. See the first formula.

%H Paolo Xausa, <a href="/A380909/b380909.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="https://dlmf.nist.gov/5.4#i">Gamma Function</a>, Digital library of mathematical functions, Feb. 2024.

%F r(n) = ((n/2)! / ((n - 1) / 2)!) * [sqrt(Pi) if n is even otherwise 2/sqrt(Pi)].

%F r(n) = n / r(n - 1) for n >= 1.

%F r(n) ~ sqrt(n)*exp(1/(4*n))*(Pi/2)^(cos(Pi*n)/2).

%F Product_{k=0..n} r(k) = A006882(n).

%F a(n) = numerator(r(n)).

%F a(n) = A006882(n)/A095987(n). - _R. J. Mathar_, Feb 10 2025

%F a(n) = A004731(n+1). - _R. J. Mathar_, Feb 10 2025

%p seq(numer(doublefactorial(n) / doublefactorial(n - 1)), n = 0..20);

%p # Alternative:

%p a := n -> numer((GAMMA(n/2 + 1) / GAMMA(n/2 + 1/2)) * ifelse(n::even, sqrt(Pi), 2/sqrt(Pi))):

%p seq(a(n), n = 0..35);

%t A380909[n_] := Numerator[n!!/(n - 1)!!]; Array[A380909, 50, 0] (* or *)

%t Numerator[FoldList[#2/# &, 1, Range[49]]] (* _Paolo Xausa_, Feb 11 2025 *)

%o (Python)

%o from fractions import Fraction

%o from functools import cache

%o @cache

%o def R(n: int) -> Fraction:

%o if n == 0: return Fraction(1, 1)

%o return Fraction(n, 1) / R(n - 1)

%o def aList(upto:int) -> list[int]:

%o return [R(n).numerator for n in range(upto + 1)]

%o print(aList(35))

%Y Cf. A380910 (denominator), A006882, A095987, A004730, A004731.

%K nonn,frac,new

%O 0,3

%A _Peter Luschny_, Feb 09 2025