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-6 of 6 results.

A036691 Compositorial numbers: product of first n composite numbers.

Original entry on oeis.org

1, 4, 24, 192, 1728, 17280, 207360, 2903040, 43545600, 696729600, 12541132800, 250822656000, 5267275776000, 115880067072000, 2781121609728000, 69528040243200000, 1807729046323200000, 48808684250726400000, 1366643159020339200000
Offset: 0

Views

Author

Keywords

Comments

a(A196415(n)) = A141092(n) * A053767(A196415(n)). - Reinhard Zumkeller, Oct 03 2011
For n>11, A000142(n) < a(n) < A002110(n). - Chayim Lowen, Aug 18 2015
For n = {2,3,4}, a(n) is testably a Zumkeller number (A083207). For n > 4, a(n) is of the form 2^e_1 * p_2^e_2 * … * p_m^e_m, where e_m = 1 and e = floor(log_2(p_m)) < e_1. Therefore, 2^e * p_m^e_m is primitive Zumkeler number (A180332). Therefore, 2^e_1 * p_m^e_m is a Zumkeller number. Therefore, a(n) = 2^e_1 * p_m^e_m * r, where r is relatively prime to 2*p_m is a Zumkeller number. Therefore, for n > 1, a(n) is a Zumkeller number (see my proof at A002182 for details). - Ivan N. Ianakiev, May 04 2020

Examples

			a(3) = c(1)*c(2)*c(3) = 4*6*8 = 192.
		

Crossrefs

Cf. primorial numbers A002110. Distinct members of A049614. See also A049650, A060880.
Cf. A092435 (subsequence: A092435(n) = a(prime(n)-n-1)). - Chayim Lowen, Jul 23 2015

Programs

  • Haskell
    a036691_list = scanl1 (*) a002808_list -- Reinhard Zumkeller, Oct 03 2011
    
  • Maple
    A036691 := proc(n)
            mul(A002808(i),i=1..n) ;
    end proc: # R. J. Mathar, Oct 03 2011
  • Mathematica
    Composite[n_] := FixedPoint[n + PrimePi[ # ] + 1 &, n + PrimePi[n] + 1]; Table[ Product[ Composite[i], {i, 1, n}], {n, 0, 18}] (* Robert G. Wilson v, Sep 13 2003 *)
    nn=50;cnos=Complement[Range[nn],Prime[Range[PrimePi[nn]]]];Rest[FoldList[ Times,1,cnos]] (* Harvey P. Dale, May 19 2011 *)
    A036691 = Union[Table[n!/(Times@@Prime[Range[PrimePi[n]]]), {n, 29}]] (* Alonso del Arte, Sep 21 2011 *)
    Join[{1},FoldList[Times,Select[Range[30],CompositeQ]]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 14 2019 *)
  • PARI
    a(n)=my(c,p);c=4;p=1;while(n>0,if(!isprime(c),p=p*c;n=n-1);c=c+1);p \\ Ralf Stephan, Dec 21 2013
    
  • Python
    from sympy import factorial, primepi, primorial, composite
    def A036691(n):
        return factorial(composite(n))//primorial(primepi(composite(n))) if n > 0 else 1 # Chai Wah Wu, Sep 08 2020

Formula

From Chayim Lowen, Jul 23 - Aug 05 2015: (Start)
a(n) = Product_{k=1..A002808(n)-n-1} prime(k)^(A085604(A002808(n),k)-1).
Sum_{k >= 1} 1/a(k) = 1.2975167655550616507663335821769... is to this sequence as e is to the factorials. (End)

Extensions

Corrected and extended by Niklas Eriksen (f95-ner(AT)nada.kth.se) and N. J. A. Sloane

A115627 Irregular triangle read by rows: T(n,k) = multiplicity of prime(k) as a divisor of n!.

Original entry on oeis.org

1, 1, 1, 3, 1, 3, 1, 1, 4, 2, 1, 4, 2, 1, 1, 7, 2, 1, 1, 7, 4, 1, 1, 8, 4, 2, 1, 8, 4, 2, 1, 1, 10, 5, 2, 1, 1, 10, 5, 2, 1, 1, 1, 11, 5, 2, 2, 1, 1, 11, 6, 3, 2, 1, 1, 15, 6, 3, 2, 1, 1, 15, 6, 3, 2, 1, 1, 1, 16, 8, 3, 2, 1, 1, 1, 16, 8, 3, 2, 1, 1, 1, 1
Offset: 2

Views

Author

Keywords

Comments

The factorization of n! is n! = 2^T(n,1)*3^T(n,2)*...*p_(pi(n))^T(n,pi(n)) where p_k = k-th prime, pi(n) = A000720(n).
Nonzero terms of A085604; T(n,k) = A085604(n,k), k = 1..A000720(n). - Reinhard Zumkeller, Nov 01 2013
For n=2, 3, 4 and 5, all terms of the n-th row are odd. Are there other such rows? - Michel Marcus, Nov 11 2018
From Gus Wiseman, May 15 2019: (Start)
Differences between successive rows are A067255, so row n is the sum of the first n row-vectors of A067255 (padded with zeros on the right so that all n row-vectors have length A000720(n)). For example, the first 10 rows of A067255 are
{}
1
0 1
2 0
0 0 1
1 1 0
0 0 0 1
3 0 0 0
0 2 0 0
1 0 1 0
with column sums (8,4,2,1), which is row 10.
(End)
For all prime p > 7, 3*p > 2*nextprime(p), so for any n > 21 there will always be a prime p dividing n! with exponent 2 and there are no further rows with all entries odd. - Charlie Neder, Jun 03 2019

Examples

			From _Gus Wiseman_, May 09 2019: (Start)
Triangle begins:
   1
   1  1
   3  1
   3  1  1
   4  2  1
   4  2  1  1
   7  2  1  1
   7  4  1  1
   8  4  2  1
   8  4  2  1  1
  10  5  2  1  1
  10  5  2  1  1  1
  11  5  2  2  1  1
  11  6  3  2  1  1
  15  6  3  2  1  1
  15  6  3  2  1  1  1
  16  8  3  2  1  1  1
  16  8  3  2  1  1  1  1
  18  8  4  2  1  1  1  1
(End)
m such that 5^m||101!: floor(log(101)/log(5)) = 2 terms. floor(101/5) = 20. floor(20/5) = 4. So m = u_1 + u_2 = 20 + 4 = 24. - _David A. Corneth_, Jun 22 2014
		

Crossrefs

Row lengths are A000720.
Row-sums are A022559.
Row-products are A135291.
Row maxima are A011371.

Programs

  • Haskell
    a115627 n k = a115627_tabf !! (n-2) !! (k-1)
    a115627_row = map a100995 . a141809_row . a000142
    a115627_tabf = map a115627_row [2..]
    -- Reinhard Zumkeller, Nov 01 2013
    
  • Maple
    A115627 := proc(n,k) local d,p; p := ithprime(k) ; n-add(d,d=convert(n,base,p)) ; %/(p-1) ; end proc: # R. J. Mathar, Oct 29 2010
  • Mathematica
    Flatten[Table[Transpose[FactorInteger[n!]][[2]], {n, 2, 20}]] (* T. D. Noe, Apr 10 2012 *)
    T[n_, k_] := Module[{p, jm}, p = Prime[k]; jm = Floor[Log[p, n]]; Sum[Floor[n/p^j], {j, 1, jm}]]; Table[Table[T[n, k], {k, 1, PrimePi[n]}], {n, 2, 20}] // Flatten (* Jean-François Alcover, Feb 23 2015 *)
  • PARI
    a(n)=my(i=2);while(n-primepi(i)>1,n-=primepi(i);i++);p=prime(n-1);sum(j=1,log(i)\log(p),i\=p) \\ David A. Corneth, Jun 21 2014

Formula

T(n,k) = Sum_{i=1..inf} floor(n/(p_k)^i). (Although stated as an infinite sum, only finitely many terms are nonzero.)
T(n,k) = Sum_{i=1..floor(log(n)/log(p_k))} floor(u_i) where u_0 = n and u_(i+1) = floor((u_i)/p_k). - David A. Corneth, Jun 22 2014

A060175 Square array A(n,k) = exponent of the largest power of k-th prime which divides n, read by falling antidiagonals.

Original entry on oeis.org

0, 0, 1, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0
Offset: 1

Views

Author

Henry Bottomley, Mar 14 2001

Keywords

Examples

			a(12,1) = 2 since 4 = 2^2 = p_1^2 divides 12 but 8 = 2^3 does not.
a(12,2) = 1 since 3 = p_2 divides 12 but 9 = 3^2 does not.
See also examples in A249344, which is transpose of this array.
The top-left corner of the array:
n\k | 1  2  3  4  5  6  7  8
----+------------------------
1   | 0, 0, 0, 0, 0, 0, 0, 0,
2   | 1, 0, 0, 0, 0, 0, 0, 0,
3   | 0, 1, 0, 0, 0, 0, 0, 0,
4   | 2, 0, 0, 0, 0, 0, 0, 0,
5   | 0, 0, 1, 0, 0, 0, 0, 0,
6   | 1, 1, 0, 0, 0, 0, 0, 0,
7   | 0, 0, 0, 1, 0, 0, 0, 0,
8   | 3, 0, 0, 0, 0, 0, 0, 0,
9   | 0, 2, 0, 0, 0, 0, 0, 0,
10  | 1, 0, 1, 0, 0, 0, 0, 0,
11  | 0, 0, 0, 0, 1, 0, 0, 0,
12  | 2, 1, 0, 0, 0, 0, 0, 0,
...
		

Crossrefs

Transpose: A249344.
Column 1: A007814.
Column 2: A007949.
Column 3: A112765.
Column 4: A214411.
Row sums: A001222.

Programs

  • Mathematica
    T[n_, k_] := IntegerExponent[n, Prime[k]];
    Table[T[n-k+1, k], {n, 1, 15}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Nov 18 2019 *)
  • PARI
    a(n, k) = valuation(n, prime(k)); \\ Michel Marcus, Jun 24 2017
  • Python
    from sympy import prime
    def a(n, k):
        p=prime(n)
        i=z=0
        while p**i<=k:
            if k%(p**i)==0: z=i
            i+=1
        return z
    for n in range(1, 10): print([a(n - k + 1, k) for k in range(1, n + 1)]) # Indranil Ghosh, Jun 24 2017
    
  • Scheme
    (define (A060175 n) (A249344bi (A004736 n) (A002260 n)))
    (define (A249344bi row col) (let ((p (A000040 row))) (let loop ((n col) (i 0)) (cond ((not (zero? (modulo n p))) i) (else (loop (/ n p) (+ i 1)))))))
    ;; Antti Karttunen, Oct 28 2014
    

Formula

A(n, k) = log(A060176(n, k))/log(A000040(k)) = k-th digit from right of A054841(n).

Extensions

Erroneous example corrected and more terms computed by Antti Karttunen, Oct 28 2014
Name clarified by Antti Karttunen, Jan 16 2025

A034876 Number of ways to write n! as a product of smaller factorials each greater than 1.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 1, 1, 2, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Keywords

Comments

By definition, a(n) > 0 if and only if n is a member of A034878. If n > 2, then a(n!) > max(a(n), a(n!-1)), as (n!)! = n!*(n!-1)!. Similarly, a(A001013(n)) > 0 for n > 2. Clearly a(n)=0 if n is a prime A000040. So a(n+1)=1 if n=2^p-1 is a Mersenne prime A000668, as (n+1)!=(2!)^p*n! and n is prime. - Jonathan Sondow, Dec 15 2004
From Antti Karttunen, Dec 25 2018: (Start)
If n! = a! * x! * y! * ... * z!, with a > x >= y >= z, then A006530(n!) = A006530(a!) > A006530(x!). This follows because all rows in A115627 end with 1, that is, because all factorials >= 2 are in A102750.
If all the two-term solutions are of the form n! = a! * x! = b! * y! = ... = c! * z! (that is, all are products of two factorials larger than one), with a > x, b > y, ..., c > z, then a(n) = (a(x)+1 + a(y)+1 + ... + a(z)+1).
Values 0..5 occur for the first time at n = 1, 4, 10, 576, 13824, 69120.
In range 1..69120 differs from A322583 only at positions n = 1, 2, 9, 10 and 16.
(End)

Examples

			a(10) = 2 because 10! = 3! * 5! * 7! = 6! * 7! are the only two ways to write 10! as a product of smaller factorials > 1.
From _Antti Karttunen_, Dec 25 2018: (Start)
a(8) = 1 because 8! = 7! * (2!)^3.
a(9) = 1 because 9! = 7! * 3! * 3! * 2!.
a(16) = 2 because 16! = 15! * (2!)^4 = 14! * 5! * 2!.
a(144) = 2 because 144! = 143! * 4! * 3! = 143! * 3! * 3! * 2! * 2!.
a(576) = 3 because 576! = 575! * 4! * 4! = 575! * 4! * 3! * 2! * 2! = 575! * 3! * 3! * 2! * 2! * 2! * 2!.
a(720) = 2 because 720! = 719! * 6! = 719! * 5! * 3!.
a(3456) = 3 because 3456! = 3455! * 4! * 4! * 3! = 3455! * 4! * 3! * 3! * 2! * 2! = 3455! * 3! * 3! * 3! * 2! * 2! * 2! * 2!.
(End)
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, B23.

Crossrefs

Programs

  • PARI
    A034876aux(n, m, p) = if(1==n, 1, my(s=0); forstep(i=m, p, -1, my(f=i!); if(!(n%f), s += A034876aux(n/f, i, 2))); (s));
    A034876(n) = if(1==n,0,A034876aux(n!, n-1, precprime(n))); \\ (Slow) - Antti Karttunen, Dec 24 2018
    
  • PARI
    A322583aux(n, m) = if(1==n, 1, my(s=0); for(i=2, oo, my(f=i!); if(f>m, return(s)); if(!(n%f), s += A322583aux(n/f, f))));
    memoA322583 = Map();
    A322583(n) = { my(c); if(mapisdefined(memoA322583,n,&c), c, c = A322583aux(n,n); mapput(memoA322583,n,c); (c)); };
    A034876aux(n, m, p) = if(1==n, 1, my(s=0); forstep(i=m, p, -1, my(f=i!); s += A322583(n/f)); (s));
    A034876(n) = if(1==n, 0, A034876aux(n!, n-1, precprime(n))); \\ Antti Karttunen, Dec 25 2018

Formula

a(1) = 0; for n > 1, a(n) = Sum_{x=A007917(n)..n-1} A322583(n!/x!) when n is a composite, and a(n) = 0 when n is a prime. - Antti Karttunen, Dec 25 2018

Extensions

Corrected by Jonathan Sondow, Dec 18 2004

A249344 A(n,k) = exponent of the largest power of n-th prime which divides k, square array read by antidiagonals.

Original entry on oeis.org

0, 1, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Antti Karttunen, Oct 28 2014

Keywords

Comments

Square array A(n,k), where n = row, k = column, read by antidiagonals: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ... (transpose of array A060175).
A(n,k) is the (p_n)-adic valuation of k, where p_n is the n-th prime, A000040(n).
Each row is effectively a ruler function, s, with s(1) = 0. - Peter Munn, Apr 30 2022

Examples

			The top-left corner of the array:
  0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, ...
  0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1, 0, ...
  0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, ...
  0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, ...
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, ...
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ...
  ...
A(1,8) = 3, because 2^3 is the largest power of 2 (= p_1 = A000040(1)) that divides 8.
a(2,9) = 2, because 3^2 is the largest power of 3 (= p_2) that divides 9.
a(3,15) = 1, because 5^1 is the largest power of 5 (= p_3) that divides 15.
		

Crossrefs

Transpose: A060175.
Row 1: A007814.
Row 2: A007949.
Row 3: A112765.
Row 4: A214411.
Completely additive sequences where more than one prime is mapped to 1, all other primes to 0: A065339, A083025, A087436, A169611.
Ruler functions, s, with s(1) = 0 that are not rows here: A122840, A122841, A235127, A244413.

Programs

  • Mathematica
    A[n_, k_] := IntegerExponent[k, Prime[n]]; Table[A[k, n - k + 1], {n, 1, 15}, {k, 1, n}] // Flatten (* Amiram Eldar, Oct 01 2023 *)
  • PARI
    a(n, k) = valuation(k, prime(n)); \\ Michel Marcus, Jun 24 2017
  • Python
    from sympy import prime
    def a(n, k):
        p=prime(n)
        i=z=0
        while p**i<=k:
            if k%(p**i)==0: z=i
            i+=1
        return z
    for n in range(1, 10): print([a(k, n - k + 1) for k in range(1, n + 1)]) # Indranil Ghosh, Jun 24 2017
    
  • Scheme
    (define (A249344 n) (A249344bi (A002260 n) (A004736 n)))
    (define (A249344bi row col) (let ((p (A000040 row))) (let loop ((n col) (i 0)) (cond ((not (zero? (modulo n p))) i) (else (loop (/ n p) (+ i 1)))))))
    

Formula

Row n, as a sequence, is completely additive with A(n, prime(n)) = 1, A(n, prime(m)) = 0 for m <> n. - Peter Munn, Apr 30 2022
Sum_{k=1..m} A(n,k) ~ (1/(prime(n)-1)) * m. - Amiram Eldar, Oct 01 2023

A092435 Prime factorials divided by their corresponding primorials.

Original entry on oeis.org

1, 1, 4, 24, 17280, 207360, 696729600, 12541132800, 115880067072000, 1366643159020339200000, 40999294770610176000000, 1854768736099424576471040000000, 109950690675973888893203251200000000, 4617929008390903333514536550400000000, 420600974084243475616503989010432000000000
Offset: 1

Views

Author

Don Willard (dwillard(AT)prairie.cc.il.us), Mar 23 2004

Keywords

Examples

			E.g., 2 factorial divided by 2 primorial is 1; 3 factorial is 6, divided by 3 primorial (3*2=6) is also 1; 5 factorial is 120, divided by 5 primorial (5*3*2=30) is 4 and so forth.
		

Crossrefs

Subsequence of A036691. - Chayim Lowen, Jul 23 2015

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, 1,
          a(n-1)*mul(i, i=ithprime(n-1)+1..ithprime(n)-1))
        end:
    seq(a(n), n=1..15);  # Alois P. Heinz, Jan 15 2025
  • Mathematica
    Table[ Prime[n]! / Times @@ Prime[ Range[ n]], {n, 13}] (* Robert G. Wilson v, Mar 25 2004 *)
  • PARI
    a(n)=prime(n)!/prod(i=1,n,prime(i)) \\ Ralf Stephan, Dec 21 2013

Formula

p!/p# = A039716/A002110.
Partial products of A061214. - Lekraj Beedassy, Nov 06 2006
From Chayim Lowen, Jul 23 - Aug 05 2015: (Start)
a(n) = A036691(A065890(n)).
a(n) = Product_{k=1..n} prime(k)^(A085604(prime(n),k)-1).
a(n) = A049614(prime(n)).
a(n) = Product_{k=1..prime(n)} k^A066247(k). (End)

Extensions

Edited by Robert G. Wilson v, Mar 25 2004
More terms from Michel Marcus, Jan 15 2025
Showing 1-6 of 6 results.