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

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

A090622 Square array read by antidiagonals of highest power of k dividing n! (with n,k>1).

Original entry on oeis.org

1, 0, 1, 0, 1, 3, 0, 0, 1, 3, 0, 0, 1, 1, 4, 0, 1, 0, 1, 2, 4, 0, 0, 1, 1, 2, 2, 7, 0, 0, 0, 1, 1, 2, 2, 7, 0, 0, 1, 0, 2, 1, 3, 4, 8, 0, 0, 0, 1, 0, 2, 1, 3, 4, 8, 0, 0, 0, 0, 1, 1, 2, 1, 4, 4, 10, 0, 0, 0, 1, 1, 1, 1, 4, 2, 4, 5, 10, 0, 0, 1, 0, 1, 1, 2, 1, 4, 2, 5, 5, 11, 0, 0, 0, 1, 0, 1, 1, 2, 1, 4, 2, 5, 5, 11
Offset: 2

Views

Author

Henry Bottomley, Dec 06 2003

Keywords

Examples

			Square array starts:
1, 0, 0, 0, 0, 0, 0, ...
1, 1, 0, 0, 1, 0, 0, ...
3, 1, 1, 0, 1, 0, 1, ...
3, 1, 1, 1, 1, 0, 1, ...
4, 2, 2, 1, 2, 0, 1, ...
4, 2, 2, 1, 2, 1, 1, ...
7, 2, 3, 1, 2, 1, 2, ...
		

Crossrefs

Programs

  • Maple
    f:= proc(n, p) local c, k; c, k:= 0, p;
           while n>=k do c:= c+iquo(n, k); k:= k*p od; c
        end:
    T:= (n, k)-> min(seq(iquo(f(n, i[1]), i[2]), i=ifactors(k)[2])):
    seq(seq(T(n, 2+d-n), n=2..d), d=2..20);  # Alois P. Heinz, Oct 04 2012
  • Mathematica
    f[n_, p_] := Module[{c = 0, k = p}, While[n >= k , c = c + Quotient[n, k]; k = k*p ]; c ]; t[n_, k_] := Min[ Table[ Quotient[f[n, i[[1]]], i[[2]]], {i, FactorInteger[k]}]]; Table[ Table[t[n, 2 + d - n], {n, 2, d}], {d, 2, 20}] // Flatten (* Jean-François Alcover, Oct 03 2013, translated from Alois P. Heinz's Maple program *)

Formula

For k=p prime: T(n,p) = [n/p] + [n/p^2] + [n/p^3] + .... For k = p^m a prime power: T(n,p^m) = [T(n,p)/m]. For k = b*c with b and c coprime: T(n,a*b) = min(T(n,a), T(n,b)). T(n,k) is close to, but below, n/A090624(k).

A090623 Triangle of T(n,k) = [n/k] + [n/k^2] + [n/k^3] + [n/k^4] + ... for n, k > 1.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Dec 06 2003

Keywords

Examples

			Rows start:
  1;
  1,1;
  3,1,1;
  3,1,1,1;
  4,2,1,1,1;
  4,2,1,1,1,1;
  7,2,2,1,1,1,1;
  7,4,2,1,1,1,1,1;
  8,4,2,2,1,1,1,1,1;
  ...
		

Crossrefs

Programs

  • Mathematica
    A090623[n_, k_] := Quotient[n - DigitSum[n, k], k - 1];
    Table[A090623[n, k], {n, 2, 15}, {k, 2, n}] (* Paolo Xausa, Sep 02 2025 *)
  • PARI
    T(n,k) = {my(s = 0, j = 1); while(p=n\k^j, s += p; j++); s;} \\ Michel Marcus, Feb 02 2016
    
  • PARI
    T(n,k) = (n - sumdigits(n,k))/(k-1) \\ Zhuorui He, Aug 25 2025

Formula

For p prime, T(n, p) = A090622(n, p) is the number of times that p is a factor of n!.
T(n,k) = (n - A240236(n, k))/(k - 1). - Zhuorui He, Aug 25 2025

Extensions

a(41) onward corrected by Zhuorui He, Aug 25 2025

A090621 Exponent of highest power of 16 dividing n!.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Dec 06 2003

Keywords

Examples

			a(10)=2 since 10! = 3628800 = 16^2 * 14175.
		

Crossrefs

Programs

Formula

a(n) = A090622(n, 16) = floor(A011371(n)/4) = floor(A090616(n)/2) = floor((floor(n/2) + floor(n/4) + floor(n/8) + floor(n/16) + ...)/4). Almost n/4.

A269445 a(n) = Sum_{k=0..n} floor(k/13).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 82, 86, 90, 94, 98, 102, 106, 110, 114, 118, 122, 126, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 27 2016

Keywords

Comments

Partial sums of A090620.
More generally, the ordinary generating function for the Sum_{k=0..n} floor(k/m) is x^m/((1 - x^m)*(1 - x)^2).

Crossrefs

Cf. A090620.
Cf. similar sequences of Sum_{k=0..n} floor(k/m): A002620 (m=2), A130518 (m=3), A130519 (m=4), A130520 (m=5), A174709 (m=6), A174738 (m=7), A118729 (m=8), A218470 (m=9), A131242 (m=10), A218530 (m=11), A221912 (m=12), this sequence (m=13).

Programs

  • Mathematica
    Table[Sum[Floor[k/13], {k, 0, n}], {n, 0, 73}]
    LinearRecurrence[{2, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2}, 74]

Formula

G.f.: x^13/((1 - x^13)*(1 - x)^2).
a(n) = 2*a(n-1) - a(n-2) + a(n-13) - 2*a(n-14) + a(n-15).
Showing 1-5 of 5 results.