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

A319316 Numbers k such that A090616(k) < A054861(k).

Original entry on oeis.org

3, 9, 15, 27, 28, 29, 30, 31, 39, 45, 54, 55, 57, 63, 81, 82, 83, 84, 85, 87, 90, 91, 93, 94, 95, 99, 108, 109, 110, 111, 117, 118, 119, 123, 126, 127, 135, 162, 163, 165, 171, 174, 175, 183, 189, 190, 191, 207, 219, 243, 244, 245, 246, 247, 248, 249, 250, 251
Offset: 1

Views

Author

Jianing Song, Sep 17 2018

Keywords

Comments

Numbers k such that the highest power of 12 dividing n! is determined by the highest power of 4 dividing n!.
Note that A054861 and A090616 are both asymptotic to a(n) = n/2 + O(log(n)), nevertheless, it seems that the number of k such that A090616(k) is bigger predominates. Conjecture: the ratio of k <= N such that A090616(k) > A054861(k) tends to 1 as N tends to infinity, while the ratio of k <= N such that A090616(k) < A054861(k) and A090616(k) = A054861(k) both tend to 0.
Number of k in range [0, N] such that A090616(k) =, < or > A054861(k):
..N....A090616(k) = A054861(k)...A090616(k) < A054861(k)...A090616(k) > A054861(k)
10^2...............38........................26........................37
10^3..............344.......................228.......................429
10^4.............2703......................2227......................5071
10^5............23003.....................19892.....................57106
10^6...........203478....................185152....................611371
10^7..........1762288...................1726062...................6511651

Examples

			The highest power of 3 dividing 9! is 3^4, while the highest power of 4 dividing 9! is 4^3, so 9 is a term, and the highest power of 12 dividing 9! is 12^3.
The highest power of 3 dividing 15! is 3^6, while the highest power of 4 dividing 15! is 4^5, so 15 is a term, and the highest power of 12 dividing 15! is 12^5.
		

Crossrefs

Cf. A217445 (k such that A090616(k) = A054861(k)), A319317 (k such that A090616(k) > A054861(k)).

Programs

  • PARI
    isA319316(n)=(n-vecsum(digits(n, 2)))\2<(n-vecsum(digits(n, 3)))\2

A319317 Numbers k such that A090616(k) > A054861(k).

Original entry on oeis.org

8, 16, 17, 20, 24, 25, 26, 32, 34, 35, 40, 41, 44, 48, 49, 50, 52, 53, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 96, 97, 98, 104, 106, 107, 116, 128, 129, 130, 131, 132, 133, 134, 136, 137, 140, 142, 143, 144, 145, 146, 148, 149, 150, 151
Offset: 1

Views

Author

Jianing Song, Sep 17 2018

Keywords

Comments

Numbers k such that the highest power of 12 dividing n! is determined by the highest power of 3 dividing n!.
Note that A054861 and A090616 are both asymptotic to a(n) = n/2 + O(log(n)), nevertheless, it seems that the number of k such that A090616(k) is bigger predominates. Conjecture: the ratio of k <= N such that A090616(k) >A054861(k) tends to 1 as N tends to infinity, while the ratio of k <= N such thatA090616(k) < A054861(k) and A090616(k) = A054861(k) both tend to 0.
Number of k in range [0, N] such that A090616(k) =, < or > A054861(k):
N A090616(k) = A054861(k) A090616(k) < A054861(k) A090616(k) > A054861(k)
10^2 38 26 37
10^3 344 228 429
10^4 2703 2227 5071
10^5 23003 19892 57106
10^6 203478 185152 611371
10^7 1762288 1726062 6511651

Examples

			The highest power of 3 dividing 8! is 3^2, while the highest power of 4 dividing 8! is 4^3, so 8 is a term, and the highest power of 12 dividing 8! is 12^2.
The highest power of 3 dividing 16! is 3^6, while the highest power of 4 dividing 16! is 4^7, so 16 is a term, and the highest power of 12 dividing 16! is 12^6.
		

Crossrefs

Cf. A217445 (k such that A090616(k) = A054861(k)), A319316 (k such that A090616(k) < A054861(k)).

Programs

  • PARI
    isA319317(n)=(n-vecsum(digits(n, 2)))\2>(n-vecsum(digits(n, 3)))\2

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

A054893 a(n) = Sum_{j > 0} floor(n/4^j).

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, 12, 12, 13, 13, 13, 13, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24
Offset: 0

Views

Author

Henry Bottomley, May 23 2000

Keywords

Comments

Different from highest power of 4 dividing n! (see A090616).

Examples

			  a(10^0) = 0.
  a(10^1) = 2.
  a(10^2) = 32.
  a(10^3) = 330.
  a(10^4) = 3331.
  a(10^5) = 33330.
  a(10^6) = 333330.
  a(10^7) = 3333329.
  a(10^8) = 33333328.
  a(10^9) = 333333326.
		

Crossrefs

Cf. A053737, A235127 (first differences).

Programs

  • Magma
    function A054893(n)
      if n eq 0 then return n;
      else return A054893(Floor(n/4)) + Floor(n/4);
      end if; return A054893;
    end function;
    [A054893(n): n in [0..103]]; // G. C. Greubel, Feb 09 2023
    
  • Mathematica
    Table[t=0; p=4; While[s=Floor[n/p]; t=t+s; s>0, p *= 4]; t, {n,0,100}]
    Table[Total[Floor/@(n/NestList[4#&,4,6])],{n,0,80}] (* Harvey P. Dale, Jun 12 2022 *)
  • PARI
    a(n) = (n - sumdigits(n,4))/3; \\ Kevin Ryde, Jan 08 2024
  • SageMath
    def A054893(n):
        if (n==0): return 0
        else: return A054893(n//4) + (n//4)
    [A054893(n) for n in range(104)] # G. C. Greubel, Feb 09 2023
    

Formula

a(n) = floor(n/4) + floor(n/16) + floor(n/64) + floor(n/256) + ...
a(n) = (n - A053737(n))/3.
From Hieronymus Fischer, Sep 15 2007: (Start)
a(n) = a(floor(n/4)) + floor(n/4).
a(4*n) = a(n) + n.
a(n*4^m) = a(n) + n*(4^m-1)/3.
a(k*4^m) = k*(4^m-1)/3, for 0 <= k < 4, m >= 0.
Asymptotic behavior:
a(n) = n/3 + O(log(n)),
a(n+1) - a(n) = O(log(n)); this follows from the inequalities below.
a(n) <= (n-1)/3; equality holds true for powers of 4.
a(n) >= (n-3)/3 - floor(log_4(n)); equality holds true for n = 4^m - 1, m>0. lim inf (n/3 - a(n)) = 1/3, for n-->oo.
lim sup (n/3 - log_4(n) - a(n)) = 0, for n-->oo.
lim sup (a(n+1) - a(n) - log_4(n)) = 0, for n-->oo.
G.f.: (1/(1-x))*Sum_{k > 0} x^(4^k)/(1-x^(4^k)). (End)
Partial sums of A235127. - R. J. Mathar, Jul 08 2021

Extensions

Edited by Hieronymus Fischer, Sep 15 2007
Examples added by Hieronymus Fischer, Jun 06 2012

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

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.

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