A004730 Numerator of n!!/(n+1)!! (cf. A006882).
1, 1, 2, 3, 8, 5, 16, 35, 128, 63, 256, 231, 1024, 429, 2048, 6435, 32768, 12155, 65536, 46189, 262144, 88179, 524288, 676039, 4194304, 1300075, 8388608, 5014575, 33554432, 9694845, 67108864, 300540195, 2147483648, 583401555, 4294967296, 2268783825
Offset: 0
Links
- T. D. Noe, Table of n, a(n) for n=0..300
- Joseph E. Cooper III, A recurrence for an expression involving double factorials, arXiv:1510.00399 [math.CO], 2015.
- Svante Janson, On the traveling fly problem, Graph Theory Notes of New York Vol. XXXI, 17, 1996.
Programs
-
Haskell
import Data.Ratio ((%), denominator) a004730 n = a004730_list !! n a004730_list = map denominator ggs where ggs = 1 : 2 : zipWith (+) ggs (map (1 /) $ tail ggs) :: [Rational] -- Reinhard Zumkeller, Dec 08 2011
-
Magma
DoubleFactorial:=func< n | &*[n..2 by -2] >; [ Numerator(DoubleFactorial(n) / DoubleFactorial(n+1)): n in [0..35]]; // Vincenzo Librandi, Dec 03 2018
-
Mathematica
Numerator[#[[1]]/#[[2]]&/@Partition[Range[0,40]!!,2,1]] (* Harvey P. Dale, Jan 22 2013 *) Numerator[CoefficientList[Series[(1 - Sqrt[1 - c^2] + ArcSin[c])/(c Sqrt[1 - c^2]),{c, 0, 39}], c]] (* Eugene d'Eon, Nov 01 2018 *)
-
PARI
f(n) = prod(i=0, (n-1)\2, n - 2*i); \\ A006882 a(n) = numerator(f(n)/f(n+1)); \\ Michel Marcus, Feb 09 2025
-
Python
from sympy import gcd, factorial2 def A004730(n): a, b = factorial2(n), factorial2(n+1) return a//gcd(a,b) # Chai Wah Wu, Apr 03 2021
Formula
Let y(m) = y(m-2) + 1/y(m-1) for m >= 2, with y(0)=y(1)=1. Then the denominator of y(n+1) equals the numerator of n!!/(n+1)!! for n >= 0, where the double factorials are given by A006882. [Reinhard Zumkeller, Dec 08 2011, as corrected in Cooper (2015)]