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.

Showing 1-10 of 18 results. Next

A056040 Swinging factorial, a(n) = 2^(n-(n mod 2))*Product_{k=1..n} k^((-1)^(k+1)).

Original entry on oeis.org

1, 1, 2, 6, 6, 30, 20, 140, 70, 630, 252, 2772, 924, 12012, 3432, 51480, 12870, 218790, 48620, 923780, 184756, 3879876, 705432, 16224936, 2704156, 67603900, 10400600, 280816200, 40116600, 1163381400, 155117520, 4808643120, 601080390, 19835652870, 2333606220
Offset: 0

Views

Author

Labos Elemer, Jul 25 2000

Keywords

Comments

a(n) is the number of 'swinging orbitals' which are enumerated by the trinomial n over [floor(n/2), n mod 2, floor(n/2)].
Similar to but different from A001405(n) = binomial(n, floor(n/2)), a(n) = lcm(A001405(n-1), A001405(n)) (for n>0).
A055773(n) divides a(n), A001316(floor(n/2)) divides a(n).
Exactly p consecutive multiples of p follow the least positive multiple of p if p is an odd prime. Compare with the similar property of A100071. - Peter Luschny, Aug 27 2012
a(n) is the number of vertices of the polytope resulting from the intersection of an n-hypercube with the hyperplane perpendicular to and bisecting one of its long diagonals. - Didier Guillet, Jun 11 2018 [Edited by Peter Munn, Dec 06 2022]

Examples

			a(10) = 10!/5!^2 = trinomial(10,[5,0,5]);
a(11) = 11!/5!^2 = trinomial(11,[5,1,5]).
		

Crossrefs

Programs

  • Magma
    [(Factorial(n)/(Factorial(Floor(n/2)))^2): n in [0..40]]; // Vincenzo Librandi, Sep 11 2011
    
  • Maple
    SeriesCoeff := proc(s,n) series(s(w,n),w,n+2);
    convert(%,polynom); coeff(%,w,n) end;
    a1 := proc(n) local k;
    2^(n-(n mod 2))*mul(k^((-1)^(k+1)),k=1..n) end:
    a2 := proc(n) option remember;
    `if`(n=0,1,n^irem(n,2)*(4/n)^irem(n+1,2)*a2(n-1)) end;
    a3 := n -> n!/iquo(n,2)!^2;
    g4 := z -> BesselI(0,2*z)*(1+z);
    a4 := n -> n!*SeriesCoeff(g4,n);
    g5 := z -> (1+z/(1-4*z^2))/sqrt(1-4*z^2);
    a5 := n -> SeriesCoeff(g5,n);
    g6 := (z,n) -> (1+z^2)^n+n*z*(1+z^2)^(n-1);
    a6 := n -> SeriesCoeff(g6,n);
    a7 := n -> combinat[multinomial](n,floor(n/2),n mod 2,floor(n/2));
    h := n -> binomial(n,floor(n/2)); # A001405
    a8 := n -> ilcm(h(n-1),h(n));
    F := [a1, a2, a3, a4, a5, a6, a7, a8];
    for a in F do seq(a(i), i=0..32) od;
  • Mathematica
    f[n_] := 2^(n - Mod[n, 2])*Product[k^((-1)^(k + 1)), {k, n}]; Array[f, 33, 0] (* Robert G. Wilson v, Aug 02 2010 *)
    f[n_] := If[OddQ@n, n*Binomial[n - 1, (n - 1)/2], Binomial[n, n/2]]; Array[f, 33, 0] (* Robert G. Wilson v, Aug 10 2010 *)
    sf[n_] := With[{f = Floor[n/2]}, Pochhammer[f+1, n-f]/f!]; (* or, twice faster: *) sf[n_] := n!/Quotient[n, 2]!^2; Table[sf[n], {n, 0, 32}] (* Jean-François Alcover, Jul 26 2013, updated Feb 11 2015 *)
  • PARI
    a(n)=n!/(n\2)!^2 \\ Charles R Greathouse IV, May 02 2011
    
  • Sage
    def A056040():
        r, n = 1, 0
        while True:
            yield r
            n += 1
            r *= 4/n if is_even(n) else n
    a = A056040(); [next(a) for i in range(36)]  # Peter Luschny, Oct 24 2013

Formula

a(n) = n!/floor(n/2)!^2. [Essentially the original name.]
a(0) = 1, a(n) = n^(n mod 2)*(4/n)^(n+1 mod 2)*a(n-1) for n>=1.
E.g.f.: (1+x)*BesselI(0, 2*x). - Vladeta Jovovic, Jan 19 2004
O.g.f.: a(n) = SeriesCoeff_{n}((1+z/(1-4*z^2))/sqrt(1-4*z^2)).
P.g.f.: a(n) = PolyCoeff_{n}((1+z^2)^n+n*z*(1+z^2)^(n-1)).
a(2n+1) = A046212(2n+1) = A100071(2n+1). - M. F. Hasler, Jan 25 2012
a(2*n) = binomial(2*n,n); a(2*n+1) = (2*n+1)*binomial(2*n,n). Central terms of triangle A211226. - Peter Bala, Apr 10 2012
D-finite with recurrence: n*a(n) + (n-2)*a(n-1) + 4*(-2*n+3)*a(n-2) + 4*(-n+1)*a(n-3) + 16*(n-3)*a(n-4) = 0. - Alexander R. Povolotsky, Aug 17 2012
Sum_{n>=0} 1/a(n) = 4/3 + 8*Pi/(9*sqrt(3)). - Alexander R. Povolotsky, Aug 18 2012
E.g.f.: U(0) where U(k)= 1 + x/(1 - x/(x + (k+1)*(k+1)/U(k+1))); (continued fraction, 3-step). - Sergei N. Gladkovskii, Oct 19 2012
Central column of the coefficients of the swinging polynomials A162246. - Peter Luschny, Oct 22 2013
a(n) = Sum_{k=0..n} A189231(n, 2*k). (Cf. A212303 for the odd case.) - Peter Luschny, Oct 30 2013
a(n) = hypergeometric([-n,-n-1,1/2],[-n-2,1],2)*2^(n-1)*(n+2). - Peter Luschny, Sep 22 2014
a(n) = 4^floor(n/2)*hypergeometric([-floor(n/2), (-1)^n/2], [1], 1). - Peter Luschny, May 19 2015
Sum_{n>=0} (-1)^n/a(n) = 4/3 - 4*Pi/(9*sqrt(3)). - Amiram Eldar, Mar 10 2022

Extensions

Extended and edited by Peter Luschny, Jun 28 2009

A055204 Squarefree part of n!: n! divided by its largest square divisor.

Original entry on oeis.org

1, 2, 6, 6, 30, 5, 35, 70, 70, 7, 77, 231, 3003, 858, 1430, 1430, 24310, 12155, 230945, 46189, 969969, 176358, 4056234, 676039, 676039, 104006, 312018, 44574, 1292646, 1077205, 33393355, 66786710, 2203961430, 64822395, 90751353, 90751353
Offset: 1

Views

Author

Labos Elemer, Jun 19 2000

Keywords

Comments

Smallest number such that n!*a(n) is a square.

Examples

			10! = 518400*7 = 7*(720)^2, so a(10) = 7.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := p^Mod[e, 2]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n!]; Array[a, 40] (* Amiram Eldar, Sep 01 2024 *)
    a[n_] := Block[{fi = Transpose@ FactorInteger[n!]}, Times @@ (fi[[1]]^Mod[fi[[2]], 2])]; Array[a, 40] (* Robert G. Wilson v, Nov 17 2024 *)
  • PARI
    a(n)=core(n!) \\ Charles R Greathouse IV, Apr 03 2012

Formula

a(n) = A007913(n!) = n!/A055071(n) = A000142(n)/A055071(n).
log a(n) ~ n log 2. - Charles R Greathouse IV, Apr 03 2012
sqrt(n!) = A055772(n) * sqrt(a(n)). - Alonso del Arte, Feb 16 2015

A055071 Largest square dividing n!.

Original entry on oeis.org

1, 1, 1, 4, 4, 144, 144, 576, 5184, 518400, 518400, 2073600, 2073600, 101606400, 914457600, 14631321600, 14631321600, 526727577600, 526727577600, 52672757760000, 52672757760000, 6373403688960000, 6373403688960000, 917770131210240000, 22944253280256000000
Offset: 1

Views

Author

Labos Elemer, Jun 13 2000

Keywords

Crossrefs

Programs

  • Maple
    seq(expand(numtheory[nthpow](n!, 2)), n=1..26); # Peter Luschny, Apr 03 2013
  • Mathematica
    a[n_] := Select[Reverse @ Divisors[n!], IntegerQ[Sqrt[#]] &, 1] // First; a /@ Range[23] (* Jean-François Alcover, May 19 2011 *)
    f[p_, e_] := p^(2*Floor[e/2]); a[n_] := Times @@ (f @@@ FactorInteger[n!]); Array[a, 30] (* Amiram Eldar, Jul 26 2024 *)
  • PARI
    a(n)=core(n!,2)[2]^2 \\ Charles R Greathouse IV, Apr 04 2012
    
  • Python
    from math import prod
    from itertools import count, islice
    from collections import Counter
    from sympy import factorint
    def A055071_gen(): # generator of terms
        c = Counter()
        for i in count(1):
            c += Counter(factorint(i))
            yield prod(p**(e-(e&1)) for p, e in c.items())
    A055071_list = list(islice(A055071_gen(),30)) # Chai Wah Wu, Jul 27 2024

Formula

a(n) = A008833(n!).
log a(n) ~ n log n. - Charles R Greathouse IV, Apr 04 2012
a(n) = A055772(n)^2. - Amiram Eldar, Jul 26 2024

Extensions

More terms from James Sellers, Jun 20 2000

A055993 Number of square divisors of n!.

Original entry on oeis.org

1, 1, 1, 2, 2, 6, 6, 8, 12, 30, 30, 36, 36, 72, 96, 128, 128, 180, 180, 300, 300, 600, 600, 864, 1152, 2304, 2688, 4368, 4368, 5376, 5376, 6144, 6144, 13056, 16320, 19440, 19440, 38880, 43200, 48000, 48000, 64000, 64000, 100800, 133056, 278784, 278784
Offset: 1

Views

Author

Labos Elemer, Jul 21 2000

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Count[Divisors[n!], d_ /; IntegerQ@ Sqrt@ d], {n, 30}] (* Michael De Vlieger, Feb 05 2017 *)
  • PARI
    a(n) = sumdiv(n!, d, issquare(d)); \\ Michel Marcus, Dec 26 2013

Formula

a(n) = A046951(n!) = A000005(A055772(n)) = A000005(A000188(A000142(n))).

A056038 Largest factorial k! such that (k!)^2 divides n!.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 6, 6, 24, 24, 720, 720, 720, 720, 5040, 5040, 40320, 40320, 362880, 362880, 3628800, 3628800, 39916800, 39916800, 479001600, 479001600, 6227020800, 6227020800, 1307674368000, 1307674368000, 1307674368000, 1307674368000, 20922789888000
Offset: 0

Views

Author

Labos Elemer, Jul 25 2000

Keywords

Comments

This is neither floor(n/2)! nor ceiling(n/2)!, but often coincides with one of them.
a(n) = k!, where k = floor(n/2) + d(n) and d = 0, 1, 2, ... . Below 1000, d = 1 arises 93 times, and d = 2 arises 4 times. See A056067 and A056068.

Examples

			For n = 10 or n = 11, floor(n/2)! = 5! = 120; 5!^2 = 14400 divides 10! = 14400*252 or 11! = 14400*2772. However, 10!/6!^2 = 7 and 11!/6!^2 = 77, i.e., (d + floor(n/2))^2 may divide n!. Here d = 1, but d > 1 also occurs as follows: for n = 416 or n = 417, floor(n/2) = 208, and 208!^2 divides 416! and 417!, but 209!^2 and 210!^2 also divide these factorials.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = 1}, NestWhile[#/(++k)^2 &, n!, IntegerQ]; (k-1)!]; Array[a, 33, 0] (* Amiram Eldar, May 24 2024 *)

Formula

a(n)^2 = A105350(n).

A056039 Largest k such that (k!)^2 divides n!.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 3, 4, 4, 6, 6, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 15, 15, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 28, 28, 28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 37
Offset: 1

Views

Author

Labos Elemer, Jul 25 2000

Keywords

Comments

Let d(n) = a(n) - floor(n/2). Then, d(n) >= 0, and below 1000, d=1 arises 93 times, and d=2 arises 4 times.
The first occurrence of d(k) = 0, 1, 2, ..., is at k = 2, 1 (=A056067(1)), 416 (=A056068(1)), 6950, 16348, 505930, ... . - Amiram Eldar, May 24 2024

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = 1}, NestWhile[#/(++k)^2 &, n!, IntegerQ]; k - 1]; Array[a, 100] (* Amiram Eldar, May 24 2024 *)

Formula

A105350(n) = A001044(a(n)).

A056042 a(n) = n!/(k!)^2, where k is the largest number such that (k!)^2 divides n!.

Original entry on oeis.org

1, 2, 6, 6, 30, 20, 140, 70, 630, 7, 77, 924, 12012, 3432, 51480, 12870, 218790, 48620, 923780, 184756, 3879876, 705432, 16224936, 2704156, 67603900, 10400600, 280816200, 178296, 5170584, 155117520, 4808643120, 601080390, 19835652870
Offset: 1

Views

Author

Labos Elemer, Jul 25 2000

Keywords

Comments

Least integer of the form n!/{(n-k)!}^2.
Similar to but different from A001405.

Examples

			E.g. for n=9, 10, 11, 12, a(n)=630, 7, 77, 924 while the corresponding central binomial coefficients are 126, 252, 462, 924 respectively.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Min[ Select[ Table[ n!/(n - k)!^2, {k, n}], IntegerQ[ # ] &]]; Table[ f[n], {n, 33}] (Robert G. Wilson v)

A056044 Let k be the largest number such that k^2 divides n! and let m be the largest number such that m!^2 divides n!; a(n) = k/m!.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 1, 3, 1, 1, 2, 2, 2, 6, 3, 3, 2, 2, 2, 2, 2, 2, 2, 10, 10, 30, 2, 2, 12, 12, 3, 3, 6, 30, 10, 10, 10, 30, 6, 6, 2, 2, 2, 30, 60, 60, 30, 210, 42, 42, 42, 42, 1, 1, 2, 2, 4, 4, 4, 4, 4, 84, 21, 21, 14, 14, 14, 42, 6, 6, 2, 2, 2, 10, 10, 70, 140, 140, 14, 126, 3, 3, 6, 30
Offset: 1

Views

Author

Labos Elemer, Jul 25 2000

Keywords

Examples

			For n = 11, 11! = 6! * 6! * 77, so A000188(11!) = A056038(11) = 6! and a(11) = 6!/6! = 1.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := p^Floor[e/2]; b[1] = 1; b[n_] := Times @@ f @@@ FactorInteger[n!];
    c[n_] := Module[{k = 1}, NestWhile[#/(++k)^2 &, n!, IntegerQ]; (k-1)!];
    a[n_] := b[n] / c[n]; Array[a, 100] (* Amiram Eldar, May 24 2024 *)

Formula

a(n) = A000188(n!)/A056038(n).

Extensions

Name corrected by Amiram Eldar, May 24 2024

A056627 a(n) = A056622(n!).

Original entry on oeis.org

1, 1, 1, 1, 1, 12, 12, 12, 36, 720, 720, 480, 480, 1680, 3024, 12096, 12096, 145152, 145152, 7257600, 345600, 1900800, 1900800, 136857600, 684288000, 4447872000, 4447872000, 435891456000, 435891456000, 3138418483200, 3138418483200, 6276836966400, 190207180800
Offset: 1

Views

Author

Labos Elemer, Aug 08 2000

Keywords

Comments

Previous name "Square root of largest unitary square divisor of n!" was incorrect. See A374989 for the correct sequence with this name. - Amiram Eldar, Jul 26 2024

Examples

			a(12) = A056622(12!) = A000188(12!)/A055229(12!) = 1440/3 = 480.
		

Crossrefs

Programs

Formula

a(n) = A055772(n)/A055230(n) = A000188(n!)/A055229(n!).
a(n) = A056622(n!). - Michel Marcus, Aug 16 2020
a(n) = sqrt(A056628(n)). - Amiram Eldar, Jul 08 2024

Extensions

More terms from Michel Marcus, Aug 16 2020
Incorrect name replaced with a formula by Amiram Eldar, Jul 26 2024

A065887 Smallest number whose square is divisible by n!.

Original entry on oeis.org

1, 1, 2, 6, 12, 60, 60, 420, 1680, 5040, 5040, 55440, 332640, 4324320, 8648640, 43243200, 172972800, 2940537600, 8821612800, 167610643200, 335221286400, 7039647014400, 14079294028800, 323823762662400, 647647525324800, 3238237626624000, 6476475253248000
Offset: 0

Views

Author

Henry Bottomley, Nov 27 2001

Keywords

Examples

			a(10) = 5040 since 10! = 3628800 and the smallest square divisible by this is 25401600 = 3628800*7 = 5040^2.
		

Crossrefs

Programs

  • Maple
    a:= n-> mul(i[1]^ceil(i[2]/2), i=ifactors(n!)[2]):
    seq(a(n), n=0..26);  # Alois P. Heinz, Jan 24 2022
  • Mathematica
    f[p_, e_] := p^Ceiling[e/2]; a[0] = a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n!]; Array[a, 30, 0] (* Amiram Eldar, Feb 11 2024 *)

Formula

a(n) = A019554(A000142(n)) = sqrt(A065886(n)) = A000142(n)/A055772(n).

Extensions

Missing a(0) inserted, formula corrected, and a(25)-a(26) added by Kevin P. Thompson, Jan 24 2022
Showing 1-10 of 18 results. Next