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.

A307035 a(n) is the unique integer k such that A108951(k) = n!.

Original entry on oeis.org

1, 1, 2, 3, 12, 20, 60, 84, 672, 1512, 5040, 7920, 47520, 56160, 157248, 393120, 6289920, 8225280, 37013760, 41368320, 275788800, 579156480, 1820206080, 2203407360, 26440888320, 73446912000, 173601792000, 585906048000, 3281073868800, 4137006182400, 20685030912000
Offset: 0

Views

Author

Allan C. Wechsler, Mar 20 2019

Keywords

Comments

For all n, n! = A108951(k) for some unique k. This sequence gives that k for each n. In some sense this sequence tells how to factor factorials into primorials.
Represent n! as a product of primorials p#. Then replace each primorial with its base prime to calculate a(n).

Examples

			Represent 7! as a product of primorials:
7! = 2^4 * 3^2 * 5 * 7 = (2#)^2 * 3# * 7#
Replace primorials by primes:
2^2 * 3 * 7 = 84.
So a(7) = 84.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) option remember; `if`(n<2, 0, f(n-1)+add(
          i[2]*x^numtheory[pi](i[1]), i=ifactors(n)[2]))
        end:
    a:= proc(n) local d, p, r; p, r:= f(n), 1;
          do d:= degree(p); if d<1 then break fi;
             p, r:= p-add(x^i, i=1..d), ithprime(d)*r
          od: r
        end:
    seq(a(n), n=0..35);  # Alois P. Heinz, Mar 21 2019
  • Mathematica
    q[n_] := Apply[Times, Table[Prime[i], {i, 1, PrimePi[n]}]]; Flatten[{1, 1, Table[val = 1; fak = n!; Do[If[PrimeQ[k], Do[If[Divisible[fak, q[k]], val = val*k; fak = fak/q[k]], {j, 1, n}]], {k, n, 2, -1}]; val, {n, 2, 30}]}] (* Vaclav Kotesovec, Mar 21 2019 *)
  • PARI
    g(n) = my(f=factor(n)); prod(k=1, #f~, my(p=f[k, 1]); (p/if(p>2, precprime(p-1), 1))^f[k, 2]); \\ A319626/A319627
    a(n) = prod(k=1, n, g(k)); \\ Daniel Suteu, Mar 21 2019
    
  • PARI
    A307035(n) = { my(m=1, pp=1); n=n!; while(1, forprime(p=2, ,if(n%p, if(2==p, return(m), break), n /= p; pp = p)); m *= pp); }; \\ Antti Karttunen, Dec 29 2019

Formula

a(0) = 1, a(n) = a(n-1) * (A319626(n) / A319627(n)), for n > 0. - Daniel Suteu, Mar 21 2019
a(n) = n! / Product_{k=1..n} A064989(k). - Vaclav Kotesovec, Mar 21 2019
a(n) = A122111(A325508(n)) = A319626(A000142(n)) = A329900(A000142(n)). - Antti Karttunen, Nov 19 & Dec 29 2019

Extensions

a(12)-a(13) from Michel Marcus, Mar 21 2019
a(14)-a(15) from Vaclav Kotesovec, Mar 21 2019
a(0), a(16)-a(30) from Alois P. Heinz, Mar 21 2019