A217467 a(1) = 1; for n > 1, the maximum exponent k such that n^k divides the double factorial n!!.
1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 3, 1, 2, 1, 2, 2, 1, 1, 5, 2, 1, 2, 2, 1, 3, 1, 6, 2, 1, 3, 4, 1, 1, 2, 4, 1, 3, 1, 2, 6, 1, 1, 10, 2, 3, 2, 2, 1, 4, 3, 4, 2, 1, 1, 7, 1, 1, 6, 10, 3, 3, 1, 2, 2, 5, 1, 8, 1, 1, 5, 2, 4, 3, 1, 9, 5, 1, 1, 6, 3, 1
Offset: 1
Keywords
Examples
24^5 = 7962624 divides 24!! = 1961990553600 but 24^6 does not so a(24)=5.
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..10000
Programs
-
Maple
A217467 := proc(n) local df,k ; if n = 1 then return 1; end if; df := doublefactorial(n) ; for k from 1 do if (df mod n^(k+1)) <> 0 then return k; end if; end do: end proc: # R. J. Mathar, Oct 10 2012
-
Mathematica
Join[{1}, Table[IntegerExponent[n!!, n], {n, 2, 200}]]
-
PARI
a(n)={my(h=(n+1)\2); if (n==1, 1, valuation(if(n%2, (2*h)!/(2^h*h!), 2^h*h!), n))} \\ Andrew Howroyd, Feb 25 2018
Comments