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 19 results. Next

A056672 Number of unitary and squarefree divisors of n! Also, number of divisors of the special squarefree part of n!, A055773(n).

Original entry on oeis.org

1, 2, 4, 2, 4, 2, 4, 4, 4, 2, 4, 4, 8, 4, 4, 4, 8, 8, 16, 16, 16, 8, 16, 16, 16, 8, 8, 8, 16, 16, 32, 32, 32, 16, 16, 16, 32, 16, 16, 16, 32, 32, 64, 64, 64, 32, 64, 64, 64, 64, 64, 64, 128, 128, 128, 128, 128, 64, 128, 128, 256, 128, 128, 128, 128, 128, 256, 256, 256, 256
Offset: 1

Views

Author

Labos Elemer, Aug 10 2000

Keywords

Comments

The divisor d=1 is counted here as being free of prime divisors and also unitary.

Examples

			n=11: 11! = 2*2*2*2*2*2*2*2*3*3*3*3*5*5*7*11, has 540 divisors, 32 are unitary and 32 are squarefree. Only 4 divisors, {1,7,11,77} have both properties, so a(11)=4.
		

Crossrefs

Programs

  • Mathematica
    rad[n_] := Times @@ First /@ FactorInteger[n]; p[n_] := Denominator[n/rad[n]^2]; a[n_] := DivisorSigma[0, p[n!]]; Array[a, 70] (* Amiram Eldar, Sep 22 2019 *)
  • PARI
    a(n) = my(f=n!); sumdiv(f, d, issquarefree(d) && (gcd(d, f/d) == 1)); \\ Michel Marcus, Sep 05 2017
    
  • PARI
    a(n) = 1 << (primepi(n) - primepi(n>>1)); \\ Kevin Ryde, Jun 03 2023

Formula

a(n) = A000005(A055231(n!)).
a(n) = A000005(A007913(n!)/A055229(n!)).
a(n) = A000005(A055773(n)).
a(n) = 2^A056171(n). - Kevin Ryde, Jun 03 2023

A182922 a(n) = n! / A055773(n).

Original entry on oeis.org

1, 1, 1, 1, 8, 8, 144, 144, 1152, 10368, 518400, 518400, 6220800, 6220800, 609638400, 9144576000, 146313216000, 146313216000, 2633637888000, 2633637888000, 52672757760000, 1106127912960000, 267682954936320000
Offset: 0

Views

Author

Peter Luschny, Mar 05 2011

Keywords

Comments

a(n) = n! * P(floor(n/2))/P(n), where P(n) is a primorial number (A034386).

Programs

  • Maple
    A182922 := n -> n! / mul(k, k=select(isprime, [$iquo(n,2)+1..n])):
    # Or without division:
    a182922 := proc(n) local k,i,R;
    R := {seq(i,i=1..n)} minus {op(select(isprime,[seq(i,i=iquo(n,2)+1..n)]))};
    mul(k,k=R) end:
  • Mathematica
    a[n_] := n!/Numerator[n!/Floor[n/2]!^4];
    Table[a[n], {n, 0, 22}] (* Jean-François Alcover, Jun 18 2019 *)

A182923 a(n) = n$ / A055773(n), where n$ denotes the swinging factorial (A056040).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 4, 4, 2, 18, 36, 36, 12, 12, 24, 360, 90, 90, 20, 20, 4, 84, 168, 168, 28, 700, 1400, 37800, 5400, 5400, 720, 720, 90, 2970, 5940, 207900, 23100, 23100, 46200, 1801800, 180180, 180180, 17160
Offset: 0

Views

Author

Peter Luschny, Mar 05 2011

Keywords

Comments

a(n) = n$ * P(floor(n/2))/P(n), P(n) primorial number A034386.
A182922(n) / a(n) = A000142(n) / A056040(n) = A180064(n).

Crossrefs

Programs

  • Maple
    swingfact := n -> n! / iquo(n,2)!^2;
    A182923 := n -> swingfact(n) / mul(k, k=select(isprime, [$iquo(n,2)+1..n])):
  • Mathematica
    sf[n_] := n!/Floor[n/2]!^2;
    a[n_] := sf[n]/Numerator[n!/Floor[n/2]!^4];
    Table[a[n], {n, 0, 42}] (* Jean-François Alcover, Jun 22 2019 *)

A094300 Duplicate of A055773.

Original entry on oeis.org

1, 2, 6, 3, 15, 5, 35, 35, 35, 7, 77, 77, 1001, 143, 143, 143, 2431, 2431, 46189, 46189
Offset: 1

Views

Author

Keywords

A270975 Indices i such that A055773(i) is not equal to A130087(i).

Original entry on oeis.org

4, 5, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 1105, 1106, 1107
Offset: 1

Views

Author

John M. Campbell, Mar 27 2016

Keywords

Comments

A number-theoretic explanation as to 'why' there is such a large gap between a(2) and a(3) is given in the Mathematics Stack Exchange link given below.

Examples

			A055773(897) is approximately equal to 3.6*10^191 and A130087(897) is approximately equal to 8.4*10^192. The third index i such that A055773(i) is not equal to A130087(i) is i=897, and thus a(3)=897.
		

Crossrefs

Programs

  • PARI
    A055773(n)=prod(i=primepi(n/2)+1,primepi(n),prime(i));
    A130087(n)=denominator(prod(k=1,n,k^moebius(k)));
    for(i=0,2000,if(A055773(i)!=A130087(i),print(i)))

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

A055231 Powerfree part of n: product of primes that divide n only once.

Original entry on oeis.org

1, 2, 3, 1, 5, 6, 7, 1, 1, 10, 11, 3, 13, 14, 15, 1, 17, 2, 19, 5, 21, 22, 23, 3, 1, 26, 1, 7, 29, 30, 31, 1, 33, 34, 35, 1, 37, 38, 39, 5, 41, 42, 43, 11, 5, 46, 47, 3, 1, 2, 51, 13, 53, 2, 55, 7, 57, 58, 59, 15, 61, 62, 7, 1, 65, 66, 67, 17, 69, 70, 71, 1, 73, 74, 3, 19, 77, 78, 79, 5
Offset: 1

Views

Author

Labos Elemer, Jun 21 2000

Keywords

Comments

The previous name was: Write n = K^2*F where F is squarefree and F = g*f where g = gcd(K,F) and f = F/g; then a(n) = f(n) = F(n)/g(n). Thus gcd(K^2,f) = 1.
Differs from A007913; they coincide if and only if g(n) = 1.
a(n) is the powerfree part of n; i.e., if n=Product(pi^ei) over all i (prime factorization) then a(n)=Product(pi^ei) over those i with ei=1; if n=b*c^2*d^3 then a(n) is minimum possible value of b. - Henry Bottomley, Sep 01 2000
Also denominator of n/rad(n)^2, where rad is the squarefree kernel of n (A007947), numerator: A062378. - Reinhard Zumkeller, Dec 10 2002
Largest unitary squarefree number dividing n (the unitary squarefree kernel of n). - Steven Finch, Mar 01 2004
From Bernard Schott, Dec 19 2022: (Start)
a(n) = 1 iff n is a squareful number (A001694).
1 < a(n) < n iff n is a nonsquarefree number that is not squareful (A332785).
a(n) = n iff n is a squarefree number (A005117). (End)

Crossrefs

Positions of 1's: A001694.
Cf. A008833, A007913, A007947, A000188, A057521, A055773 (computed for n!), A056169 (number of prime divisors), A056671 (number of divisors), A092261 (sum of divisors of the n-th term), A197863, A332785.
Cf. A005117 (subsequence).

Programs

  • Maple
    A055231 := proc(n)
        a := 1 ;
        if n > 1 then
            for f in ifactors(n)[2] do
                if op(2, f) = 1 then
                    a := a*op(1, f) ;
                end if;
            end do:
        end if;
        a ;
    end proc: # R. J. Mathar, Dec 23 2011
  • Mathematica
    rad[n_] := Times @@ First /@ FactorInteger[n]; a[n_] := Denominator[n/rad[n]^2]; Table[a[n], {n, 1, 80}] (* Jean-François Alcover, Jun 20 2013, after Reinhard Zumkeller *)
    f[p_, e_] := If[e==1, p, 1]; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Sep 07 2020 *)
  • PARI
    A055231(n)={
       local(a=1);
       f=factor(n) ;
       for(i=1,matsize(f)[1],
             if( f[i,2] ==1, a *=  f[i,1]
             )
       ) ;
       a ;
    } /* R. J. Mathar, Mar 12 2012 */
    
  • PARI
    a(n) = {my(f=factor(n)); for (k=1, #f~, if (f[k,2] > 1, f[k,2] = 0);); factorback(f);} \\ Michel Marcus, Aug 27 2017
    
  • Python
    from math import prod
    from sympy import factorint
    def A055231(n): return prod(p for p, e in factorint(n).items() if e == 1) # Chai Wah Wu, Nov 14 2022
  • Scheme
    ;; With memoization-macro definec.
    (definec (A055231 n) (if (= 1 n) 1 (* (if (= 1 (A067029 n)) (A020639 n) 1) (A055231 (A028234 n))))) ;; Antti Karttunen, Nov 28 2017
    

Formula

a(n) = A007913(n)/gcd(A008833(n), A007913(n)).
a(n) = n/A057521(n).
Multiplicative with a(p) = p and a(p^e) = 1 for e > 1. - Vladeta Jovovic, Nov 01 2001
Dirichlet g.f.: zeta(s)*Product_{primes p} (1 + p^(1-s) - p^(-s) - p^(1-2s) + p^(-2s)). - R. J. Mathar, Dec 21 2011
a(n) = A007947(n)/A071773(n). - observed by Velin Yanev, Aug 27 2017, confirmed by Antti Karttunen, Nov 28 2017
a(1) = 1; for n > 1, a(n) = A020639(n)^A063524(A067029(n)) * a(A028234(n)). - Antti Karttunen, Nov 28 2017
a(n*m) = a(n)*a(m)/(gcd(n,a(m))*gcd(m,a(n))) for all n and m > 0 (conjectured). - Velin Yanev, Feb 06 2019. [This follows easily from the comment of Vladeta Jovovic. - N. J. A. Sloane, Mar 14 2019]
From Vaclav Kotesovec, Dec 19 2019: (Start)
Dirichlet g.f.: zeta(s-1) * zeta(s) * Product_{primes p} (1 - p^(1-3*s) + p^(2-3*s) - p^(2-2*s) + p^(-2*s) - p^(-s)).
Sum_{k=1..n} a(k) ~ c * Pi^2 * n^2 / 12, where c = Product_{primes p} (1 - 2/p^2 + 2/p^4 - 1/p^5) = 0.394913518073109872954607634745304266741971541072... (End)
a(n) = A197863(n)/n. - Amiram Eldar, Sep 01 2023

Extensions

Name replaced with a simpler description (based on Henry Bottomley's comment) by Antti Karttunen, Nov 28 2017
Incorrect comments and example deleted by Peter Munn, Nov 30 2022

A094302 a(1) = 1; if n > a(n-1) then a(n) = n*a(n-1) else a(n) = least integer multiple of a(n-1)/n.

Original entry on oeis.org

1, 2, 6, 3, 15, 5, 35, 35, 35, 7, 77, 77, 77, 11, 165, 165, 165, 55, 55, 11, 231, 21, 483, 161, 161, 161, 161, 23, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 29, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363
Offset: 1

Views

Author

Amarnath Murthy, Apr 29 2004

Keywords

Examples

			a(16) = 165, 17 < 165, so a(17) = (least integer multiple of 165/17) = 165.
		

Crossrefs

Programs

  • Mathematica
    FoldList[If[#2 > #1, #1*#2, Numerator[#1/#2]] &, 1, Range[2, 56]] (* Ivan Neretin, Mar 21 2018 *)
  • PARI
    q=1;for(n=2,57,print1(q,",");q=if(n>q,q*n,q/gcd(q,n)))

Extensions

Edited by Klaus Brockhaus, May 02 2004

A372000 a(n) = product of primes p such that floor(n/p) is odd.

Original entry on oeis.org

1, 2, 6, 3, 15, 10, 70, 35, 105, 42, 462, 77, 1001, 286, 4290, 2145, 36465, 24310, 461890, 46189, 969969, 176358, 4056234, 676039, 3380195, 520030, 1560090, 111435, 3231615, 430882, 13357342, 6678671, 220396143, 25928958, 907513530, 151252255, 5596333435, 589087730, 22974421470, 2297442147
Offset: 1

Views

Author

Michael De Vlieger, Apr 15 2024

Keywords

Comments

The only primes in the sequence are 2 and 3.
We can approach the sequence in a manner akin to A260850, a variant of A008336. Set k = 1. Then for all prime factors p | n, if p | k, divide k by p, otherwise multiply k by p. Then we set a(n) = k. This accounts for the "toggling on or off" of prime factors as n increases.
For n >= 1, A055773(n) | a(n), where A055773(n) = A034386(n) / A034386(floor(n/2)).

Examples

			a(1) = 1 since n = 1 is the empty product.
a(2) = 2 since for n = 2, floor(n/p) = floor(2/2) = 1 is odd.
a(3) = 6 since for n = 3 and p = 2, floor(3/2) = 1 is odd, and for p = 3, floor(3/3) = 1 is odd. Hence a(3) = 2*3 = 6.
a(4) = 3 since for n = 4 and p = 2, floor(4/2) = 2 is even, but for p = 3, floor(4/3) = 1 is odd. Therefore, a(n) = 3.
a(5) = 15 since for n = 5, though floor(5/2) = 2 is even, floor(5/3) and floor(5/5) are both odd. Therefore, a(n) = 3*5 = 15, etc.
Table relating a(n) with b(n), diagramming prime factors with "x" that produce a(n), or powers of 2 with "x" that sum to b(n), where b(n) = A371906(n).
                Prime factor
                    1111
   n      b(n)  23571379   b(n)
  ----------------------------
   1        1   .            0
   2        2   x            1
   3        6   xx           3
   4        3   .x           2
   5       15   .xx          6
   6       10   x.x          5
   7       70   x.xx        13
   8       35   ..xx        12
   9      105   .xxx        14
  10       42   xx.x        11
  11      462   xx.xx       27
  12       77   ...xx       24
  13     1001   ...xxx      56
  14      286   x...xx      49
  15     4290   xxx.xx      55
  16     2145   .xx.xx      54
  17    36465   .xx.xxx    118
  18    24310   x.x.xxx    117
  19   461890   x.x.xxxx   245
  20    46189   ....xxxx   240
  ----------------------------
                01234567
                Power of 2
		

Crossrefs

Programs

  • Mathematica
    Table[Times @@ Select[Prime@ Range@ PrimePi[n], OddQ@ Quotient[n, #] &], {n, 40}] (* or *)
    Table[Product[Prime[i], {j, 1 + Floor[PrimePi[n]/2]}, {i, 1 + PrimePi[Floor[n/(2 j)]], PrimePi[Floor[n/(2 j - 1)]]}], {n, 40}]
  • PARI
    a(n) = vecprod(select(x->((n\x) % 2), primes([1, n]))); \\ Michel Marcus, Apr 16 2024
    
  • SageMath
    print([prod(p for p in prime_range(n + 1) if is_odd(n//p)) for n in range(1, 41)])
    # Peter Luschny, Apr 16 2024

Formula

a(n) = Product_{k = 1..floor(pi(n)/2)+1} Product_{j = 1+floor(n/(2*k))..floor(n/(2*k-1))} prime(j), where pi(x) = A000720(n).

A094299 a(0) = 1; for n>0, if gcd(a(n-1),n) = 1 then a(n) = n*a(n-1) else a(n) = least integer multiple of a(n-1)/n.

Original entry on oeis.org

1, 1, 2, 6, 3, 15, 5, 35, 280, 2520, 252, 2772, 231, 3003, 429, 143, 2288, 38896, 19448, 369512, 92378, 1939938, 88179, 2028117, 676039, 16900975, 1300075, 35102025, 5014575, 145422675, 9694845, 300540195, 9617286240, 3205762080, 94287120
Offset: 0

Views

Author

Amarnath Murthy, Apr 29 2004

Keywords

Examples

			a(5) = 15 hence a(6) = least integer multiple of 15/6 = 5.
		

Crossrefs

Cf. A055773.

Programs

  • PARI
    a=1;for(n=2,35,print1(a,",");d=gcd(a,n);a=if(d==1,a*n,a/d))

Extensions

Terms a(14) to a(34) and PARI code from Klaus Brockhaus, Apr 29 2004
Extended to include a(0) by N. J. A. Sloane, Dec 23 2007
Showing 1-10 of 19 results. Next