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.

Previous Showing 11-17 of 17 results.

A090624 If n = Product(pj^ej), i.e., written in its prime factorization, then a(n) = max_j{(pj-1)*ej}.

Original entry on oeis.org

1, 2, 2, 4, 2, 6, 3, 4, 4, 10, 2, 12, 6, 4, 4, 16, 4, 18, 4, 6, 10, 22, 3, 8, 12, 6, 6, 28, 4, 30, 5, 10, 16, 6, 4, 36, 18, 12, 4, 40, 6, 42, 10, 4, 22, 46, 4, 12, 8, 16, 12, 52, 6, 10, 6, 18, 28, 58, 4, 60, 30, 6, 6, 12, 10, 66, 16, 22, 6, 70, 4, 72, 36, 8, 18, 10, 12, 78, 4, 8, 40, 82, 6
Offset: 2

Views

Author

Henry Bottomley, Dec 06 2003

Keywords

Comments

The highest power of k dividing n! (A090622) is close to, but below, n/a(k).

Examples

			72 = 2^3*3^2 so a(72) = max((2-1)*3, (3-1)*2) = max(3,4) = 4.
		

Programs

  • Maple
    seq(max(map(t ->(t[1]-1)*t[2], ifactors(n)[2])),n=2..100); # Robert Israel, Sep 06 2016
  • Mathematica
    a[n_] := Module[{aux = FactorInteger[n]},Max[Table[aux[[i, 2]]*(aux[[i, 1]] - 1), {i, 1, Length[aux]}]]] (* José María Grau Ribas, Feb 15 2010 *)
  • PARI
    a(n)=my(f=factor(n)); vecmax(vector(#f~,i,(f[i,1]-1)*f[i,2])) \\ Charles R Greathouse IV, Sep 07 2016
    
  • Python
    from sympy import factorint
    def A090624(n): return max((p-1)*e for p, e in factorint(n).items()) # Chai Wah Wu, Apr 28 2023

Formula

a(p) = p-1; a(p^m) = (p-1)*m.
a(b*c) = max(a(b), a(c)) for b and c coprime.
a(n) = lim_{k->inf} k/A090622(k, n) = lim_{k->inf} (k/highest power of k dividing n!). - David W. Wilson, Sep 05 2016

A090618 Highest power of 9 dividing n!.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Dec 06 2003

Keywords

Examples

			a(9)=2 since 9!=362880=9^2*4480.
		

Crossrefs

Programs

  • Mathematica
    IntegerExponent[Range[0,90]!,9] (* Harvey P. Dale, Jun 07 2016 *)

Formula

a(n) =A090622(n, 9) =[A054861(n)/2] =[([n/3]+[n/9]+[n/27]+[n/81]+...)/2].

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.

A058067 Number of polynomial functions from Z to Z/nZ.

Original entry on oeis.org

1, 1, 4, 27, 64, 3125, 108, 823543, 1024, 19683, 12500, 285311670611, 1728, 302875106592253, 3294172, 84375, 65536, 827240261886336764177, 78732, 1978419655660313589123979, 200000, 22235661, 1141246682444, 20880467999847912034355032910567
Offset: 0

Views

Author

N. J. A. Sloane, Nov 24 2000

Keywords

Comments

The first formula for a(n) is due to Kempner (1921). - Jonathan Sondow, Nov 05 2017

Crossrefs

Programs

  • Maple
    A058067 := n->mul(n/gcd(n,k!),k=0..n-1);
  • Mathematica
    a[0] = 1; a[n_] := Product[n/GCD[n, k!], {k, 0, n - 1}]; Array[a, 24, 0] (* Amiram Eldar, Sep 29 2020 *)
  • PARI
    a(n) = prod(k=0, n-1, n/gcd(n, k!)); \\ Michel Marcus, Nov 06 2017

Formula

a(n) = Product_{k=0..n-1} n/gcd(n, k!).
Multiplicative with a(p^e) = p^t_p(e). - David W. Wilson, Aug 14 2005 [t_p(e) = Sum_{k>=0: e > A090622(k, p)} (e - A090622(k, p)) = p * Sum_{k = 1..e} max(0, k - A090622(e-k, p)). In particular, t_p(e) = p*e*(e+1)/2 for e <= p. - Andrey Zabolotskiy, Nov 09 2017 and Sep 29 2020]
a(prime(n)) = A051674(n). - R. J. Mathar, Apr 01 2014 [Edited by Andrey Zabolotskiy, Nov 08 2017]
a(n) = n^n / A240098(n). - Jonathan Sondow, Nov 10 2017

A217445 Numbers n such that n! has the same number of terminating zeros in bases 3 and 4.

Original entry on oeis.org

1, 2, 4, 5, 6, 7, 10, 11, 12, 13, 14, 18, 19, 21, 22, 23, 33, 36, 37, 38, 42, 43, 46, 47, 51, 56, 58, 59, 60, 61, 62, 75, 86, 88, 89, 92, 100, 101, 102, 103, 105, 112, 113, 114, 115, 120, 121, 122, 124, 125, 138, 139, 141, 147, 153, 159, 164, 166, 167, 168
Offset: 1

Views

Author

Tanya Khovanova, Oct 03 2012

Keywords

Comments

The number of zeros of n! base 3 is approaching n/2 as n grows. Similarly, the number of zeros of n! base 4 is approaching n/2 as n grows. Consequently, this sequence is expected to have high density.
From Robert Israel, Jan 19 2017: (Start)
Numbers n such that A000120(n) + (n + A000120(n) mod 2) = A053735(n).
Since typically A000120(n) ~ log_2(n) while typically A053735(n) ~ log_3(n), the density of this sequence should go to 0, contrary to the previous comment. (End)
Comment from N. J. A. Sloane, Dec 06 2019: (Start)
Appears to be the same as the list of positive numbers n such that the last nonzero digit of n! in base 12 belongs to the set [1, 2, 5, 7, 10, 11].
The first footnote in Deshouillers et al. (2016) says: "if the last nonzero digit of n! in base 12 belongs to {1, 2, 5, 7, 10, 11} then |(digit-sum of n in base 3) - (digit-sum of n in base 2)| is <= 1; this seems to occur infinitely many times." Compare A096288. (End)

Examples

			6! is 222200 in base 3 and 23100 in base 4, both of them have 2 zeros at the end, so 6 is in the sequence.
		

References

  • Jean-Marc Deshouillers, Laurent Habsieger, Shanta Laishram, Bernard Landreau, Sums of the digits in bases 2 and 3, arXiv:1611.08180, 2016

Crossrefs

Cf. A054861 (base 3), A090616 (base 4), A090622, A096288.

Programs

  • Maple
    s2:= n -> convert(convert(n,base,2),`+`):
    s3:= n -> convert(convert(n,base,3),`+`):
    select(n -> s2(n) + (n+s2(n) mod 2) = s3(n), [$1..1000]); # Robert Israel, Jan 19 2017
  • Mathematica
    sntzQ[n_]:=Module[{f=n!},Last[Split[IntegerDigits[f,3]]]==Last[ Split[ IntegerDigits[ f,4]]]]; Select[Range[200],sntzQ] (* Harvey P. Dale, Jul 11 2020 *)
  • PARI
    is(n)=my(L=log(n+1));sum(k=1,L\log(3),n\3^k)==sum(k=1,L\log(2),n>>k)\2 \\ Charles R Greathouse IV, Oct 04 2012

Extensions

More terms from Alois P. Heinz, Oct 03 2012

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.

A091136 Smallest number m such that number of times m divides k! is almost k/n for large k, i.e., smallest m with A090624(m)=n.

Original entry on oeis.org

1, 2, 3, 8, 5, 32, 7, 128, 25, 512, 11, 2048, 13, 8192, 2187, 32768, 17, 131072, 19, 524288, 121, 2097152, 23, 8388608, 169, 33554432, 1594323, 134217728, 29, 536870912, 31, 2147483648, 289, 8589934592, 129140163, 34359738368, 37
Offset: 0

Views

Author

Henry Bottomley, Dec 19 2003

Keywords

Examples

			a(2)=3 noting that 100! is a multiple of 3^48 and 48 is almost 100/2.
		

Crossrefs

Formula

a(n) = min_p{p prime and n divisible by p-1} p^(n/(p-1)).
a(p-1) = p.
a(2n+1) = 2^(2n+1).
Smallest divisor of A091137(n) which is not a divisor of A091137(n-1).
Previous Showing 11-17 of 17 results.