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

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).

A054898 a(n) = Sum_{k>0} floor(n/9^k).

Original entry on oeis.org

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

Views

Author

Henry Bottomley, May 23 2000

Keywords

Comments

Different from the highest power of 9 dividing n!, A090618.

Examples

			a(100)=12.
a(10^3)=124.
a(10^4)=1248.
a(10^5)=12498.
a(10^6)=124996.
a(10^7)=1249997.
a(10^8)=12499996.
a(10^9)=124999997.
		

Crossrefs

Cf. A011371 and A054861 for analogs involving powers of 2 and 3.

Programs

  • Mathematica
    Table[t = 0; p = 9; While[s = Floor[n/p]; t = t + s; s > 0, p *= 9]; t, {n, 0, 100} ]
    Table[Sum[Floor[n/9^k],{k,n}],{n,0,100}] (* Harvey P. Dale, Jul 10 2024 *)

Formula

a(n) = floor(n/9) + floor(n/81) + floor(n/729) + floor(n/6561) + ....
a(n) = (n-A053830(n))/8.
From Hieronymus Fischer, Aug 14 2007: (Start)
Recurrence:
a(n) = floor(n/9) + a(floor(n/9));
a(9*n) = n + a(n);
a(n*9^m) = n*(9^m-1)/8 + a(n).
a(k*9^m) = k*(9^m-1)/8, for 0<=k<9, m>=0.
Asymptotic behavior:
a(n) = n/8 + O(log(n)),
a(n+1) - a(n) = O(log(n)); this follows from the inequalities below.
a(n) <= (n-1)/8; equality holds for powers of 9.
a(n) >= (n-8)/8 - floor(log_9(n)); equality holds for n=9^m-1, m>0.
lim inf (n/8 - a(n)) =1/8, for n-->oo.
lim sup (n/8 - log_9(n) - a(n)) = 0, for n-->oo.
lim sup (a(n+1) - a(n) - log_9(n)) = 0, for n-->oo.
G.f.: g(x) = sum{k>0, x^(9^k)/(1-x^(9^k))}/(1-x). (End)

Extensions

Examples added by Hieronymus Fischer, Jun 06 2012

A090619 Highest power of 12 dividing n!.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Dec 06 2003

Keywords

Comments

Most sequences of the form "highest power of k dividing n!" essentially depend on one of the primes or prime powers dividing k. But in this case, the sequences with k=3 (A054861) and k=4 (A090616) are both close to n/2 and vary in which one is lower for different values of n.
a(2^n) = A090616(2^n) and a(3^n-1) = A090616(3^n-1) while a(2^n-1) = A054861(2^n-1) and a(3^n) = A054861(3^n). - Robert Israel, Mar 25 2018

Examples

			a(6)=2 since 6!=720=12^2*5.
		

Crossrefs

Programs

  • Maple
    f2:= n -> n - convert(convert(n,base,2),`+`):
    f3:= n -> (n - convert(convert(n,base,3),`+`))/2:
    f:= n -> min(f3(n), floor(f2(n)/2)):
    f(0):= 0:
    map(f, [$0..100]); # Robert Israel, Mar 23 2018
  • Mathematica
    Table[IntegerExponent[n!, 12], {n, 0, 100}] (* Jean-François Alcover, Mar 26 2018 *)
  • PARI
    a(n) = valuation(n!, 12); \\ Michel Marcus, Mar 24 2018

Formula

a(n) =A090622(n, 12) =min(A054861(n), A090616(n)). Close to n/2, indeed for n>3: n/2-log3(n+1) <= a(n) < n/2.

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.
Showing 1-4 of 4 results.