login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A163590 Odd part of the swinging factorial A056040. 4
1, 1, 1, 3, 3, 15, 5, 35, 35, 315, 63, 693, 231, 3003, 429, 6435, 6435, 109395, 12155, 230945, 46189, 969969, 88179, 2028117, 676039, 16900975, 1300075, 35102025, 5014575, 145422675, 9694845, 300540195 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

Let n$ denote the swinging factorial. a(n) = n$ / 2^sigma(n) where sigma(n) is the exponent of 2 in the prime-factorization of n$. sigma(n) can be computed as the number of '1's in the base 2 representation of floor(n/2).

REFERENCES

Peter Luschny, "Divide, swing and conquer the factorial and the lcm{1,2,...,n}", preprint, April 2008.

LINKS

Table of n, a(n) for n=0..31.

Peter Luschny, Swinging Factorial.

EXAMPLE

11$ = 2772 = 2^2*3^2*7*11. Therefore a(11) = 3^2*7*11 = 2772/4 = 693.

MAPLE

swing := proc(n) option remember; if n = 0 then 1 elif irem(n, 2) = 1 then swing(n-1)*n else 4*swing(n-1)/n fi end:

sigma := n -> 2^(add(i, i= convert(iquo(n, 2), base, 2))):

a := n -> swing(n)/sigma(n);

MATHEMATICA

sf[n_] := With[{f = Floor[n/2]}, Pochhammer[f+1, n-f]/ f!]; a[n_] := With[{s = sf[n]}, s/2^IntegerExponent[s, 2]]; Table[a[n], {n, 0, 31}] (* Jean-Fran├žois Alcover, Jul 26 2013 *)

PROG

(Sage)

@CachedFunction

def swing(n):

    if n == 0: return 1

    return swing(n-1)*n if is_odd(n) else 4*swing(n-1)/n

A163590 = lambda n: swing(n)/2^A000120(n//2)

[A163590(n) for n in (0..31)]  # Peter Luschny, Nov 19 2012

CROSSREFS

Cf. A056040 and A060632. A001790 = a(2*n), A001803(n) = a(2*n+1).

Sequence in context: A165405 A179857 A260078 * A114320 A185138 A285947

Adjacent sequences:  A163587 A163588 A163589 * A163591 A163592 A163593

KEYWORD

nonn

AUTHOR

Peter Luschny, Aug 01 2009

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified May 23 16:25 EDT 2017. Contains 286925 sequences.