cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A217467 a(1) = 1; for n > 1, the maximum exponent k such that n^k divides the double factorial n!!.

Original entry on oeis.org

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

Views

Author

Michel Lagneau, Oct 10 2012

Keywords

Comments

n !! is a double factorial number (see the definition in A006882).

Examples

			24^5 = 7962624 divides 24!! = 1961990553600 but 24^6 does not so a(24)=5.
		

Crossrefs

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