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

A336510 a(n) = Sum_{p | A055204(n)} 2^(pi(p) - 1).

Original entry on oeis.org

0, 1, 3, 3, 7, 4, 12, 13, 13, 8, 24, 26, 58, 51, 53, 53, 117, 116, 244, 240, 250, 235, 491, 488, 488, 457, 459, 451, 963, 964, 1988, 1989, 2007, 1942, 1946, 1946, 3994, 3867, 3897, 3900, 7996, 7991, 16183, 16167, 16163, 15906, 32290, 32288, 32288, 32289, 32355
Offset: 1

Views

Author

Michael De Vlieger, Sep 18 2020

Keywords

Comments

All terms of A055204 are squarefree by definition, therefore we can compress the terms of A055204 by interpreting the terms of reverse(A067255(A055204(n))) as a binary number and converted to decimal.

Examples

			A055204(1) = 1, the empty product; by convention a(1) = 0.
5! = 120 = 2^3 * 3 * 5, therefore 2 * 3 * 5 = 30 is the squarefree part, which we write "111", a 1 in the first three places to signify a product of the first three primes. Interpreting "111" as a binary number yields 8. Thus a(5) = 8.
13! = 6227020800 = 2^10 * 3^5 * 5^2 * 7 * 11 * 13; its squarefree part is 3 * 7 * 11 * 13 = 3003, a product of the 2nd, 4th, 5th, and 6th primes. Therefore we write "111010", which, interpreted as a binary number and converted to decimal, is 58. Thus a(13) = 58.
Table illustrating the first terms of this sequence, with b(n) = A055204(n):
               Multiplicities of p|b(n)
   n      b(n)   2  3  5  7 11 13 17 -> Binary   a(n)
  --------------------------------------------------
   1        1    .  .  .  .  .  .  .         0     0
   2        2    1  .  .  .  .  .  .         1     1
   3        6    1  1  .  .  .  .  .        11     3
   4        6    1  1  .  .  .  .  .        11     3
   5       30    1  1  1  .  .  .  .       111     7
   6        5    .  .  1  .  .  .  .       100     4
   7       35    .  .  1  1  .  .  .      1100    12
   8       70    1  .  1  1  .  .  .      1101    13
   9       70    1  .  1  1  .  .  .      1101    13
  10        7    .  .  .  1  .  .  .      1000     8
  11       77    .  .  .  1  1  .  .     11000    24
  12      231    .  1  .  1  1  .  .     11010    26
  13     3003    .  1  .  1  1  1  .    111010    58
  14      858    1  1  .  .  1  1  .    110011    51
  15     1430    1  .  1  .  1  1  .    110101    53
  16     1430    1  .  1  .  1  1  .    110101    53
  17    24310    1  .  1  .  1  1  1   1110101   117
  18    12155    .  .  1  .  1  1  1   1110100   116
  ...
		

Crossrefs

Programs

  • Mathematica
    Block[{nn = 51, k, p}, k = PrimePi@ nn; Array[Set[p[Prime@ #], 0] &, k]; {0}~Join~Reap[Do[Map[Set[p[#1], Mod[p[#1] + Mod[#2, 2], 2]] & @@ # &, FactorInteger@ i]; Sow[FromDigits[Array[p[Prime[k - # + 1]] &, k], 2]], {i, 2, nn}]][[-1, 1]]] (* or *)
    Block[{nn = 51, k = 1}, Reap[Do[Map[If[Mod[k, #] == 0, k /= #, k *= #] &, Flatten[ConstantArray[#1, #2] & @@@ FactorInteger@ i]]; Sow[If[k == 1, 0, Total@ Map[2^(PrimePi[#] - 1) &, FactorInteger[k][[All, 1]] ] ] ], {i, nn}]][[-1, 1]]]

A055773 a(n) = Product_{p in P_n} where P_n = {p prime, n/2 < p <= n }.

Original entry on oeis.org

1, 1, 2, 6, 3, 15, 5, 35, 35, 35, 7, 77, 77, 1001, 143, 143, 143, 2431, 2431, 46189, 46189, 46189, 4199, 96577, 96577, 96577, 7429, 7429, 7429, 215441, 215441, 6678671, 6678671, 6678671, 392863, 392863, 392863, 14535931, 765049, 765049, 765049
Offset: 0

Views

Author

Labos Elemer, Jul 12 2000

Keywords

Comments

Old name: Product of primes p for which p divides n! but p^2 does not (i.e. ord_p(n!)=1). - Dion Gijswijt (gijswijt(AT)science.uva.nl), Jan 07 2007
Squarefree part of n! divided by gcd(Q,F), where Q is the largest square divisor and F is the squarefree part of n!. - Labos Elemer, Jul 12 2000
a(1) = 1, a(n) = n*a(n-1) if n is a prime else a(n) = least integer multiple of a(n-1)/n. - Amarnath Murthy, Apr 29 2004
Let P(i) denote the primorial number A034386(i). Then a(n) = P(n)/P(floor(n/2)). - Peter Luschny, Mar 05 2011
Letting H(n) = 1 + 1/2 + ... + 1/n denote the n-th harmonic number, it is known that a(n) is equal to the denominator (in lowest terms) of H(n)^2*n! for n >= 6 (see below example). - John M. Campbell, Mar 27 2016
For all n satisfying 6 <= n < 897, a(n) = A130087(n). - John M. Campbell, Mar 27 2016
It is also known that a(n) is equal to lcm^2(1, 2, ..., n)/gcd(lcm^2(1, 2, ..., n), n!). - John M. Campbell, Apr 04 2016

Examples

			n = 13, P_n = {7, 11, 13}, a(13) = 7*11*13 = 1001.
Letting n = 14, the denominator (in lowest terms) of H(n)^2*n! = 131803989435744/143 is a(14)=143. - _John M. Campbell_, Mar 27 2016
		

Crossrefs

Programs

  • Maple
    a := n -> mul(k,k=select(isprime,[$iquo(n,2)+1..n])); # Peter Luschny, Jun 20 2009
    A055773 := n -> numer(n!/iquo(n,2)!^4); # Peter Luschny, Jul 30 2011
  • Mathematica
    Table[Numerator[n!/Floor[n/2]!^4], {n, 0, 40}] (* Michael De Vlieger, Mar 27 2016 *)
  • PARI
    q=1;for(n=2,41,print1(q,",");q=if(isprime(n),q*n,q/gcd(q,n))) \\ Klaus Brockhaus, May 02 2004
    
  • PARI
    a(n) = k=1;forprime(p=nextprime(n\2+1),precprime(n),k=k*p);k \\ Klaus Brockhaus, May 02 2004
    
  • PARI
    a(n) = prod(i=primepi(n/2)+1,primepi(n),prime(i)) \\ John M. Campbell, Mar 27 2016
    
  • Python
    from math import prod
    from sympy import primerange
    def A055773(n): return prod(primerange((n>>1)+1,n+1)) # Chai Wah Wu, Apr 13 2024

Formula

a(n) = numerator(A056040(n)^2/n!).
a(n) = numerator(A056040(n)/floor(n/2)!^2).
a(n) = numerator(n!/floor(n/2)!^4). - Peter Luschny, Jul 30 2011
a(n) = product of primes p such that n/2 < p <= n. - Klaus Brockhaus, May 02 2004
a(n) = A055204(n)/A055230(n) = A055231(n!) = A007913(n!)/A055229(n!).
a(n) = Product_{i=pi(n/2)+1..pi(n)} prime(i), where pi denotes the prime counting function and prime(i) denotes the i-th prime number. - John M. Campbell, Mar 27 2016

Extensions

Entry revised by N. J. A. Sloane, Jan 07 2007
Simpler definition based on a comment of Klaus Brockhaus, set offset to 0 and prepended 1 to data. - Peter Luschny, Mar 09 2013

A055772 Square root of largest square dividing n!.

Original entry on oeis.org

1, 1, 1, 2, 2, 12, 12, 24, 72, 720, 720, 1440, 1440, 10080, 30240, 120960, 120960, 725760, 725760, 7257600, 7257600, 79833600, 79833600, 958003200, 4790016000, 62270208000, 186810624000, 2615348736000, 2615348736000, 15692092416000
Offset: 1

Views

Author

Labos Elemer, Jul 12 2000

Keywords

Examples

			For n=6, 6! = 720 = 144*5 so a(6) = sqrt(144) = 12.
		

Crossrefs

Programs

  • Maple
    a:= proc(n)
    local r,F,t;
    r:= n!;
    F:= ifactors(r)[2];
    mul(t[1]^floor(t[2]/2),t=F)
    end proc:
    seq(a(n), n= 1 .. 100); # Robert Israel, Oct 19 2014
  • Mathematica
    Table[Last[Select[Sqrt[#]&/@Divisors[n!],IntegerQ]],{n,30}] (* Harvey P. Dale, Oct 08 2012 *)
    (Sqrt@Factorial@Range@30)/.Sqrt[]->1 (* _Morgan L. Owens, May 04 2016 *)
    f[p_, e_] := p^Floor[e/2]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n!]; Array[a, 40] (* Amiram Eldar, Jul 26 2024 *)
  • PARI
    a(n)=core(n!,2)[2] \\ Charles R Greathouse IV, Apr 03 2012

Formula

a(n) = A000188(n!) = sqrt(A008833(n!)) = sqrt(A055071(n)).
n! = a(n)^2*A055204(n) = a(n)^2*A007913(n!).
n! = (A000188(n!)^2)*A055229(n!)*A055231(n!).
log(a(n)) ~ n*log(n)/2. - David Radcliffe, Oct 17 2014

A055460 Number of primes with odd exponents in the prime power factorization of n!.

Original entry on oeis.org

0, 1, 2, 2, 3, 1, 2, 3, 3, 1, 2, 3, 4, 4, 4, 4, 5, 4, 5, 4, 6, 6, 7, 5, 5, 5, 6, 5, 6, 5, 6, 7, 9, 7, 7, 7, 8, 8, 8, 8, 9, 10, 11, 10, 9, 7, 8, 7, 7, 8, 10, 9, 10, 8, 10, 12, 14, 12, 13, 11, 12, 12, 11, 11, 13, 12, 13, 12, 12, 13, 14, 13, 14, 14, 15, 14, 14, 11, 12, 13, 13, 13, 14, 16, 16, 14
Offset: 1

Views

Author

Labos Elemer, Jun 26 2000

Keywords

Comments

The products of the corresponding primes form A055204.
Also, the number of primes dividing the squarefree part of n! (=A055204(n)).
Also, the number of prime factors in the factorization of n! into distinct terms of A050376. See the references in A241289. - Vladimir Shevelev, Apr 16 2014

Examples

			For n = 100, the exponents of primes in the factorization of n! are {97,48,24,16,9,7,5,5,4,3,3,2,2,2,2,1,1,1,1,1,1,1,1,1,1}, and there are 17 odd values: {97,9,7,5,5,3,3,1,1,1,1,1,1,1,1,1,1}, so a(100) = 17.
The factorization of 6! into distinct terms of A050376 is 5*9*16 with only one prime, so a(6)=1. - _Vladimir Shevelev_, Apr 16 2014
		

References

  • V. S. Shevelev, Multiplicative functions in the Fermi-Dirac arithmetic, Izvestia Vuzov of the North-Caucasus region, Nature sciences 4 (1996), 28-43 (in Russian; MR 2000f: 11097, pp. 3912-3913).

Crossrefs

Cf. A249016 (indices of records), A249017 (values of records)

Programs

  • Mathematica
    Table[Count[FactorInteger[n!][[All, -1]], m_ /; OddQ@ m] - Boole[n == 1], {n, 100}] (* Michael De Vlieger, Feb 05 2017 *)
  • PARI
    a(n) = omega(core(n!))

Formula

a(n) = A001221(A055204(n)). - Max Alekseyev, Oct 19 2014
From Wolfdieter Lang, Nov 06 2021: (Start)
a(n) = A162642(A000142(n)).
a(n) = A000720(n) - A348841(n), (End)

Extensions

Edited by Max Alekseyev, Oct 19 2014

A055230 Greatest common divisor of largest square dividing n! and squarefree part of n!.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 3, 3, 6, 10, 10, 10, 5, 5, 1, 21, 42, 42, 7, 7, 14, 42, 6, 6, 5, 5, 10, 330, 165, 231, 231, 231, 462, 2002, 5005, 5005, 4290, 4290, 390, 78, 39, 39, 13, 13, 26, 1326, 102, 102, 17, 935, 13090, 746130, 373065, 373065, 24871, 24871
Offset: 1

Views

Author

Labos Elemer, Jun 21 2000

Keywords

Examples

			a(5) = 2 because 5! = 120; largest square divisor is 4, squarefree part is 30; GCD(4, 30) = 2.
a(7) = 1 because 7! = 5040; the largest square divisor is 144 and the squarefree part is 35 and these are coprime.
		

Crossrefs

Programs

  • Mathematica
    Table[GCD[Times @@ Flatten@ Map[Table[#1, 2 Floor[#2/2]] & @@ # &, #], Times @@ Flatten@ Map[Table[#1, Floor[Mod[#2, 2]]] & @@ # &, #]] &@ FactorInteger[n!], {n, 61}] (* Michael De Vlieger, Jul 26 2016 *)
  • PARI
    a(n) = my(fn=n!, cn=core(fn)); gcd(cn, fn/cn); \\ Michel Marcus, Dec 10 2013

Formula

a(n) = GCD(A008833(n!), A007913(n!)) = GCD(A055071(n), A055204(n)).

A145642 Cubefree part of n!.

Original entry on oeis.org

1, 2, 6, 3, 15, 90, 630, 630, 210, 2100, 23100, 34650, 450450, 6306300, 28028, 7007, 119119, 2144142, 40738698, 101846745, 230945, 5080790, 116858170, 350574510, 70114902, 1822987452, 1822987452, 6380456082, 185033226378, 5550996791340
Offset: 1

Views

Author

Artur Jasinski, Oct 15 2008

Keywords

Crossrefs

Cf. A000142 (n!), A050985 (cubefree part), A248762, A248763.
CF. A055204 (squarefree part of n!).

Programs

  • Mathematica
    CubefreePart[n_Integer?Positive] := Times @@ Power @@@ ({#[[1]], Mod[ #[[2]], 3]} & /@ FactorInteger[n]); Table[CubefreePart[n! ], {n, 1, 40}]
  • PARI
    a(n) = my(f=factor(n!)); f[,2] = apply(x->(x % 3), f[,2]); factorback(f); \\ Michel Marcus, Jan 06 2019
  • Python
    from operator import mul
    from functools import reduce
    from sympy import factorint
    import math
    def A145642(n):
        return 1 if n <=1 else reduce(mul,[p**(e % 3) for p,e in factorint(math.factorial(n)).items()])
    # Chai Wah Wu, Feb 04 2015
    

Formula

a(n) = A050985(A000142(n)). - Michel Marcus, Nov 07 2013
From Amiram Eldar, Sep 01 2024: (Start)
a(n) = n! / A248762(n) = n! / A248763(n)^3.
log(a(n)) = log(3) * n + o(n) (Jakimczuk, 2017). (End)

A065886 Smallest square divisible by n!.

Original entry on oeis.org

1, 1, 4, 36, 144, 3600, 3600, 176400, 2822400, 25401600, 25401600, 3073593600, 110649369600, 18699743462400, 74798973849600, 1869974346240000, 29919589539840000, 8646761377013760000, 77820852393123840000, 28093327713917706240000, 112373310855670824960000
Offset: 0

Views

Author

Henry Bottomley, Nov 27 2001

Keywords

Examples

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

Programs

  • Maple
    N:= 50: # to get a(0)..a(N)
    P:= select(isprime, [$2..N]):
    nP:= nops(P):
    V:= Vector(nP):
    A[0]:= 1:
    for n from 1 to N do
      for i from 1 to nP do V[i]:= V[i] + padic:-ordp(n,P[i]) od;
      A[n]:= mul(P[i]^(2*ceil(V[i]/2)),i=1..nP)
    od:
    seq(A[n],n=0..N); # Robert Israel, Jan 30 2017
  • Mathematica
    ssd[n_]:=Module[{nf=n!,k=1},While[!IntegerQ[Sqrt[k*nf]],k++];k*nf]; Array[ssd,20,0] (* Harvey P. Dale, Apr 29 2012 *)

Formula

a(n) = A053143(A000142(n)) = A065887(n)^2 = A000142(n)*A055204(n) = A001044(n)/A055071(n)

A240502 Product of primes appearing in the factorization of n! with even exponents.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 6, 6, 3, 3, 30, 30, 10, 10, 35, 21, 21, 21, 42, 42, 210, 10, 55, 55, 330, 330, 2145, 715, 5005, 5005, 6006, 6006, 3003, 91, 3094, 2210, 2210, 2210, 20995, 4845, 1938, 1938, 2261, 2261, 24871, 124355, 5720330, 5720330, 17160990, 17160990, 8580495
Offset: 0

Views

Author

Vladimir Shevelev, Apr 06 2014

Keywords

Comments

All terms are squarefree (A005117). - Michel Marcus, Feb 15 2016

Examples

			In the prime power factorization 2^7*3^4*5*7 of 9! only the exponent of 3 is even. Thus a(9)=3.
		

Crossrefs

Programs

  • Mathematica
    Table[Times@@Select[FactorInteger[n!],EvenQ[#[[2]]]&][[;;,1]],{n,0,50}] (* Harvey P. Dale, Feb 24 2023 *)
  • PARI
    a(n) = {my(f = factor(n!)); for (k=1, #f~, f[k, 2] = 1 - (f[k, 2] % 2);); factorback(f);} \\ Michel Marcus, Feb 15 2016
    
  • PARI
    a(n) = {my(res=1); forprime(p=2, n\2, e=val(n,p); if(e%2==0,res*=p)); res}
    val(n, p) = my(r=0); while(n, r+=n\=p); r \\ David A. Corneth, Feb 24 2023

Formula

a(n) = rad(n!)/core(n!) = A336643(n!). - Benoit Cloitre, Mar 12 2022

Extensions

More terms from Michel Marcus, Feb 15 2016

A240504 Read (exponents of primes in the factorization of n!) modulo 2 and convert to decimal.

Original entry on oeis.org

1, 3, 3, 7, 1, 3, 11, 11, 1, 3, 11, 23, 51, 43, 43, 87, 23, 47, 15, 95, 215, 431, 47, 47, 295, 423, 391, 783, 143, 287, 1311, 1887, 847, 719, 719, 1439, 3471, 2511, 975, 1951, 7583, 15167, 14655, 12607, 4383, 8767, 575, 575, 16959, 25407, 24895, 49791, 639, 10879
Offset: 2

Views

Author

Vladimir Shevelev, Apr 06 2014

Keywords

Examples

			Since 9! = 2^7*3^4*5*7, then we have a binary number the digits of which are the exponents modulo 2: 1011. In decimal this is 11. So a(9)=11.
		

Crossrefs

Programs

  • PARI
    a(n) = subst(Pol(factor(n!)[,2] % 2), x, 2); \\ Michel Marcus, Feb 15 2016
    
  • PARI
    a(n) = { my(res = 0); forprime(p = 2, n, res = 2*res + (val(n, p)%2) ); res }
    val(n, p) = my(r=0); while(n, r+=n\=p); r \\ David A. Corneth, Feb 24 2023

Extensions

More terms from Michel Marcus, Feb 15 2016

A249016 Indices of records in A055460 (number of primes dividing the squarefree part of n!).

Original entry on oeis.org

1, 2, 3, 5, 13, 17, 21, 23, 33, 42, 43, 56, 57, 75, 84, 99, 101, 105, 109, 119, 133, 139, 157, 162, 163, 182, 183, 207, 208, 219, 220, 255, 257, 263, 267, 303, 305, 307, 315, 340, 341, 343, 383, 385, 387, 397, 411, 420, 421, 423, 469, 483, 485, 489, 505, 519, 523, 547, 552, 553, 581, 602, 603, 609, 618
Offset: 1

Views

Author

Max Alekseyev, Oct 19 2014

Keywords

Crossrefs

Cf. A249017 (values of records), A055204

Programs

  • PARI
    np=vector(10^6); b=-1; r=0; for(n=1, 10^6, f=factor(n); for(i=1, matsize(f)[1], if(f[i, 2]%2, r += (-1)^np[f[i, 1]]; np[f[i, 1]]=1-np[f[i, 1]]; )); if(r>b, b=r; print1(n, ", ")))
Showing 1-10 of 19 results. Next