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

A054861 Greatest k such that 3^k divides n!.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 2, 2, 2, 4, 4, 4, 5, 5, 5, 6, 6, 6, 8, 8, 8, 9, 9, 9, 10, 10, 10, 13, 13, 13, 14, 14, 14, 15, 15, 15, 17, 17, 17, 18, 18, 18, 19, 19, 19, 21, 21, 21, 22, 22, 22, 23, 23, 23, 26, 26, 26, 27, 27, 27, 28, 28, 28, 30, 30, 30, 31, 31, 31, 32, 32, 32, 34, 34, 34, 35, 35
Offset: 0

Views

Author

Henry Bottomley, May 22 2000

Keywords

Comments

Also the number of trailing zeros in the base-3 representation of n!. - Hieronymus Fischer, Jun 18 2007
Also the highest power of 6 dividing n!. - Hieronymus Fischer, Aug 14 2007
A column of A090622. - Alois P. Heinz, Oct 05 2012
The 'missing' values are listed in A096346. - Stanislav Sykora, Jul 16 2014

Examples

			a(100) = 48.
a(10^3) = 498.
a(10^4) = 4996.
a(10^5) = 49995.
a(10^6) = 499993.
a(10^7) = 4999994.
a(10^8) = 49999990.
a(10^9) = 499999993.
		

Crossrefs

Cf. A011371 (for analog involving powers of 2). See also A027868.
Cf. A004128 (for a(3n)).

Programs

Formula

a(n) = floor(n/3) + floor(n/9) + floor(n/27) + floor(n/81) + ... .
a(n) = (n - A053735(n))/2.
a(n+1) = Sum_{k=1..n} A007949(k). - Benoit Cloitre, Mar 24 2002
From Hieronymus Fischer, Jun 18, Jun 25 and Aug 14 2007: (Start)
G.f.: (1/(1-x))*Sum_{k>0} x^(3^k)/(1-x^(3^k)).
a(n) = Sum_{k=3..n} Sum_{j>=3, j|k} (floor(log_3(j)) - floor(log_3(j-1))).
G.f.: L[b(k)](x)/(1-x), where L[b(k)](x) = Sum_{k>=0} b(k)*x^k/(1-x^k) is a Lambert series with b(k) = 1, if k>1 is a power of 3, otherwise b(k)=0.
G.f.: (1/(1-x))*Sum_{k>0} c(k)*x^k, where c(k) = Sum_{j>1, j|k} (floor(log_3(j)) - floor(log_3(j-1))).
Recurrence:
a(n) = floor(n/3) + a(floor(n/3));
a(3*n) = n + a(n);
a(n*3^m) = n*(3^m-1)/2 + a(n).
a(k*3^m) = k*(3^m-1)/2, for 0 <= k < 3, m >= 0.
Asymptotic behavior:
a(n) = n/2 + O(log(n)),
a(n+1) - a(n) = O(log(n)); this follows from the inequalities below.
a(n) <= (n-1)/2; equality holds for powers of 3.
a(n) >= (n-2)/2 - floor(log_3(n)); equality holds for n = 3^m - 1, m > 0.
lim inf (n/2 - a(n)) = 1/2 for n->oo.
lim sup (n/2 - log_3(n) - a(n)) = 0 for n->oo.
lim sup (a(n+1) - a(n) - log_3(n)) = 0 for n->oo. (End)
a(n) = A007949(n!). - R. J. Mathar, Sep 03 2016
From R. J. Mathar, Jul 08 2021: (Start)
a(n) = A122841(n!).
Partial sums of A007949. (End)
a(n) = A007949(A000142(n)). - David A. Corneth, Nov 02 2023

Extensions

Examples added by Hieronymus Fischer, Jun 06 2012
New name by David A. Corneth, Nov 02 2023

A091137 The Hirzebruch numbers. a(n) = Product_{2 <= p <= n+1, p prime} p^floor(n / (p - 1)).

Original entry on oeis.org

1, 2, 12, 24, 720, 1440, 60480, 120960, 3628800, 7257600, 479001600, 958003200, 2615348736000, 5230697472000, 31384184832000, 62768369664000, 32011868528640000, 64023737057280000, 51090942171709440000, 102181884343418880000, 33720021833328230400000, 67440043666656460800000
Offset: 0

Views

Author

Henry Bottomley, Dec 19 2003

Keywords

Comments

Largest number m such that number of times m divides k! is almost k/n for large k, i.e., largest m with A090624(m) = n.
This is always a relatively small multiple of n!, since the multiplicity with which a prime p divides n! is always <= n/(p-1); it is equal to floor(n/(p-1)) at least when n is a power of p. - Franklin T. Adams-Watters, May 31 2010
At least for most small n, a(n) = A002790(n) * n!; the first difference is n=15. It appears that A002790(n) * n! always divides a(n).
Conjecture: The denominators of the series reversion of the sequence with e.g.f. Polylog(2,x). - Benedict W. J. Irwin, Jan 05 2017
Not only is a(n) divisible by n!; a(n) is divisible by (n + 1)! as has been observed by Bedhouche and Bakir (see links and A363596). - Hal M. Switkay, Aug 15 2025

Examples

			Let n = 4. The partitions of 4 are [[4], [3, 1], [2, 2], [2, 1, 1], [1, 1, 1, 1]]. Thus a(4) = lcm([5, 4*2, 3*3, 3*2*2, 2*2*2*2]) = 720.
		

References

  • P. Curtz, Integration numérique ..., Note 12, C.C.S.A., Arcueil, 1969; see pp. 36, 56.
  • F. Hirzebruch, Topological Methods in Algebraic Geometry, Springer, 3rd. ed., 1966; Lemma 1.7.3, p. 14. [From N. J. A. Sloane, Sep 06 2010]

Crossrefs

Starts similarly to A002207 especially for even n and all values of A002207 seen so far seem to divide a(n).

Programs

  • Maple
    A091137 := proc(n) local a,i,p ; a := 1 ; for i from 1 do p := ithprime(i) ; if p > n+1 then break; fi; a := a*p^floor(n/(p-1)) ; od: a ; end:
    seq(A091137(n), n = 0..47); # R. J. Mathar, Feb 23 2009
  • Mathematica
    A027760[n_] := Product[d, {d, Select[ Divisors[n] + 1, PrimeQ]}]; a[n_] := a[n] = A027760[n]*a[n-1]; a[0] = 1; Table[ a[n], {n, 0, 18}] (* Jean-François Alcover, Oct 04 2011 *)
  • PARI
    a(n) = local(r); r=1; forprime(p=2, n+1, r*=p^(n\(p-1))); r
    \\ Franklin T. Adams-Watters, May 31 2010
    
  • Python
    from math import prod
    from sympy import primerange
    def A091137(n): return prod(p**(n//(p-1)) for p in primerange(n+2))
    # Chai Wah Wu, Apr 28 2023
    
  • SageMath
    def a(n): return lcm(product(r + 1 for r in p) for p in Partitions(n))
    # Or, more efficient:
    from functools import cache
    @cache
    def a_rec(n):
        if n == 0: return 1
        p = mul(s for s in map(lambda i: i + 1, divisors(n)) if is_prime(s))
        return p * a_rec(n - 1)
    print([a_rec(n) for n in range(22)]) # Peter Luschny, Dec 12 2023

Formula

a(n) = Product_p {p prime} p^floor(n/(p-1)).
a(2n+1) = 2*a(2n).
a(n+1) = A027760(n+1)*a(n). - Paul Curtz, Aug 01 2008
From Peter Luschny, Dec 11 2023: (Start)
a(n) = lcm_{p in P(n)} Product_{r in p}(r + 1), where P(n) are the partitions of n.
a(n) = lcm(A238963row(n)).
a(n) = A368116(1, n), seen as the lcm of the product of the 1-shifted partitions.
a(n) = A368093(1, n), seen as the cumulative product of the Clausen numbers A160014(1, n). (End)
a(n) = lcm({k: A275314(k) = n+1}). - Hal M. Switkay, Aug 13 2025
a(n) = (n + 1)! * A363596(n). - Hal M. Switkay, Aug 15 2025

Extensions

New name using a formula of the author by Peter Luschny, Dec 11 2023

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

A011776 a(1) = 1; for n > 1, a(n) is defined by the property that n^a(n) divides n! but n^(a(n)+1) does not.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 5, 1, 2, 3, 3, 1, 4, 1, 4, 3, 2, 1, 7, 3, 2, 4, 4, 1, 7, 1, 6, 3, 2, 5, 8, 1, 2, 3, 9, 1, 6, 1, 4, 10, 2, 1, 11, 4, 6, 3, 4, 1, 8, 5, 9, 3, 2, 1, 14, 1, 2, 10, 10, 5, 6, 1, 4, 3, 11, 1, 17, 1, 2, 9, 4, 7, 6, 1, 19, 10, 2, 1, 13, 5, 2, 3, 8, 1, 21
Offset: 1

Views

Author

Keywords

Comments

From Stefano Spezia, Nov 08 2018: (Start)
It appears that for n > 1 a(n) = 1 iff n = 4 or a prime number (see A175787).
It appears that a(n) = 2 iff n is in A074845. (End)
Since a prime p is coprime to all positive integers less than p, a(p)=1. - Robert D. Rosales, Jun 17 2024
If n > 4 is composite then a(n) > 1. Proof: 1) If n is not a square of a prime, then n has a divisor d such that 1 < d < n/d < n, so d, n/d and n appear as different factors in n!, n^2 | n!, and therefore a(n) >= 2. 2) If n = p^2 is a square of a prime, then p, 2*p and p^2 appear as different factors in n! when p > 2, therefore a(n) >= 2 if n != 4. - Amiram Eldar, Jul 06 2024

Examples

			12^5 divides 12! but 12^6 does not so a(12) = 5.
		

References

  • Ivan Niven, Herbert S. Zuckerman and Hugh L. Montgomery, An Introduction to the Theory Of Numbers, Fifth Edition, John Wiley and Sons, Inc., NY 1991.
  • Joe Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 251.

Crossrefs

Diagonal of A090622.
Cf. A175787 (primes together with 4).

Programs

  • Haskell
    a011776 1 = 1
    a011776 n = length $
       takeWhile ((== 0) . (mod (a000142 n))) $ iterate (* n) n
    -- Reinhard Zumkeller, Sep 01 2012
    
  • Maple
    a := []; for n from 2 to 200 do i := 0: while n! mod n^i = 0 do i := i+1: od: a := [op(a),i-1]; od: a;
    # second Maple program:
    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:
    a:= n-> min(seq(iquo(f(n, i[1]), i[2]), i=ifactors(n)[2])): a(1):=1:
    seq(a(n), n=1..100);  # Alois P. Heinz, Oct 04 2012
  • Mathematica
    Do[m = 1; While[ IntegerQ[ n!/n^m], m++ ]; Print[m - 1], {n, 1, 100} ]
    HighestPower[n_,p_] := Module[{r,s=0,k=1}, While[r=Floor[n/p^k]; r>0, s=s+r; k++ ];s]; SetAttributes[HighestPower,Listable]; Join[{1}, Table[{p,e}=Transpose[FactorInteger[n]]; Min[Floor[HighestPower[n,p]/e]], {n,2,100}]] (* T. D. Noe, Oct 01 2008 *)
    Join[{1},Table[IntegerExponent[n!,n],{n,2,500}]] (* Vladimir Joseph Stephan Orlovsky, Dec 26 2010 *)
    f[n_, p_] := Module[{c=0, k=p}, While[n >= k , c = c + Quotient[n, k]; k = k*p ]; c]; a[1]=1; a[n_] := Min[ Table[ Quotient[f[n, i[[1]]], i[[2]]], {i, FactorInteger[n] }]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 03 2013, after Alois P. Heinz's Maple program *)
  • PARI
    a(n)=if(n>1, valuation(n!,n), 1); \\ Charles R Greathouse IV, Apr 10 2014
    
  • PARI
    vp(n,p)=my(s); while(n\=p, s+=n); s
    a(n)=if(n==1,return(1)); my(f=factor(n)); vecmin(vector(#f~, i, vp(n,f[i,1])\f[i,2])) \\ Charles R Greathouse IV, Apr 10 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

A090616 Exponent of highest power of 4 dividing n!.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 5, 7, 7, 8, 8, 9, 9, 9, 9, 11, 11, 11, 11, 12, 12, 13, 13, 15, 15, 16, 16, 17, 17, 17, 17, 19, 19, 19, 19, 20, 20, 21, 21, 23, 23, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 28, 28, 31, 31, 32, 32, 33, 33, 33, 33, 35, 35, 35, 35, 36
Offset: 0

Views

Author

Henry Bottomley, Dec 06 2003

Keywords

Examples

			a(6)=2 since 6! = 720 = 4^2 * 45.
		

Crossrefs

Programs

  • Mathematica
    IntegerExponent[Range[0, 100]!, 4] (* Vincenzo Librandi, Mar 10 2013 *)
  • PARI
    a(n) = valuation( n!, 4 ); /* Joerg Arndt, Mar 10 2013 */
    (Python 3.10+)
    def A090616(n): return (n-n.bit_count())>>1 # Chai Wah Wu, Jul 09 2022

Formula

a(n) = A090622(n, 4) = floor(A011371(n)/2) = floor((floor(n/2) + floor(n/4) + floor(n/8) + floor(n/16) + ...)/2).
a(n) = A235127(n!). - R. J. Mathar, Jul 08 2021

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

A090617 Exponent of highest power of 8 dividing n!.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 13, 13, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 18, 18, 18, 18, 19, 19, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24
Offset: 0

Views

Author

Henry Bottomley, Dec 06 2003

Keywords

Examples

			a(8)=2 since 8! = 40320 = 8^2 * 630.
		

Crossrefs

Programs

  • Mathematica
    Table[IntegerExponent[n!,8],{n,0,80}] (* Harvey P. Dale, Mar 21 2013 *)
  • PARI
    a(n) = valuation(n!, 8); \\ Michel Marcus, Jul 10 2022

Formula

a(n) = A090622(n, 8) = floor(A011371(n)/3) = floor((floor(n/2) + floor(n/4) + floor(n/8) + floor(n/16) + ...)/3).
a(n) = A244413(n!) . - R. J. Mathar, Jul 08 2021

A090620 Highest power of 13 dividing n!.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8
Offset: 0

Views

Author

Henry Bottomley, Dec 06 2003

Keywords

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 0,
          a(n-1)+padic[ordp](n, 13))
        end:
    seq(a(n), n=0..120);  # Alois P. Heinz, Jun 20 2020
  • Mathematica
    IntegerExponent[Range[0,110]!,13] (* Harvey P. Dale, Aug 22 2011 *)
    FoldList[Plus, 0, IntegerExponent[Range[100], 13]] (* T. D. Noe, Apr 10 2012 *)
  • PARI
    a(n)=my(t);while(n,t+=n\=13);t \\ Charles R Greathouse IV, Aug 06 2012

Formula

a(n) = A090622(n, 13) = A090623(n, 13) = [n/13]+[n/169]+[n/2197]+...
a(n) = n/12 + O(log n). - Charles R Greathouse IV, Aug 06 2012

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
Showing 1-10 of 17 results. Next