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 41-46 of 46 results.

A332242 Numbers k such that k! has exactly k nonzero decimal digits.

Original entry on oeis.org

1, 48, 49, 53, 54, 57
Offset: 1

Views

Author

Chai Wah Wu, Feb 07 2020

Keywords

Comments

No other terms < 100000.
Conjecture: these 6 terms are the only terms of the sequence, i.e., there are no terms larger than 57.

Examples

			48! = 12413915592536072670862289047373375038521486354677760000000000 has 48 nonzero decimal digits, so 48 is a term.
		

Crossrefs

Programs

  • Maple
    q:= n-> nops(subs(0=NULL, convert(n!, base, 10)))=n:
    select(q, [$0..100])[];  # Alois P. Heinz, Feb 07 2020
  • PARI
    isok(k) = #select(x->(x != 0), digits(k!)) == k; \\ Michel Marcus, Feb 08 2020
  • Python
    A332242_list, i, n = [], 0, 1
    while i < 1000:
        s = str(n)
        if len(s) - s.count('0') == i:
            A332242_list.append(i)
        i += 1
        n *= i
    

Formula

{ k : A034886(k) - A027869(k) = k }.

A338973 Possible number of digits in a factorial.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 18, 19, 20, 22, 23, 24, 26, 27, 29, 30, 31, 33, 34, 36, 37, 39, 41, 42, 44, 45, 47, 48, 50, 52, 53, 55, 57, 58, 60, 62, 63, 65, 67, 68, 70, 72, 74, 75, 77, 79, 81, 82, 84, 86, 88, 90, 91, 93, 95, 97, 99, 101, 102
Offset: 1

Views

Author

Christian Amet, Dec 18 2020

Keywords

Comments

This is A034886 with duplicate terms removed.

Crossrefs

Programs

  • Mathematica
    DeleteDuplicates @ IntegerLength[Range[71]!] (* Amiram Eldar, Dec 24 2020 *)

Formula

a(n) = A034886(n+3) for n>=4.

A348960 a(n) = floor(log_10(Pi*n!)).

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 20, 21, 22, 24, 25, 27, 28, 29, 31, 32, 34, 35, 37, 38, 40, 42, 43, 45, 46, 48, 50, 51, 53, 54, 56, 58, 59, 61, 63, 64, 66, 68, 70, 71, 73, 75, 77, 78, 80, 82, 84, 85, 87, 89, 91, 93, 95, 96, 98, 100
Offset: 0

Views

Author

Paul F. Marrero Romero, Nov 05 2021

Keywords

Crossrefs

Programs

Formula

a(n) = floor(log_10(Pi*n!)).
a(n) = floor(A053511 + log_10(n!)).

A350211 Numbers k such that the arithmetic mean of the digits of k! is an integer.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 12, 26, 28, 32, 59, 262, 391, 533, 579
Offset: 1

Views

Author

Zachary M Franco, Dec 19 2021

Keywords

Comments

A heuristic argument suggests that this short list is complete. By Stirling's approximation, n! has order n*log(n) digits of which n/4 are terminal zeros. If the remaining digits are random, the mean will be just below 4.5. For n > 6, n! and also its digits sum are divisible by 9. 12! is the only factorial with 9 digits. The others have 27, 30, 36, 81, 522, 846, 1224, and 1350 digits, respectively.

Examples

			4 is a term because 4! = 24 and (2+4)/2 = 3 is an integer.
		

Crossrefs

Programs

  • Maple
    q:= n-> (f-> (add(i, i=convert(f, base, 10))/length(f))::integer)(n!):
    select(q, [$0..1000])[];  # Alois P. Heinz, Dec 19 2021
  • Mathematica
    Do[If[IntegerQ[Mean[IntegerDigits[n!]]], Print[n, " ", Mean[IntegerDigits[n!]]]], {n, 1, 100000}]
  • PARI
    isok(k) = my(d=digits(k!)); (vecsum(d) % #d) == 0; \\ Michel Marcus, Dec 19 2021

A360181 Numbers k such that the number of odd digits in k! is greater than or equal to the number of even digits.

Original entry on oeis.org

0, 1, 11, 29, 36, 193, 281
Offset: 1

Views

Author

Zhining Yang, Jan 28 2023

Keywords

Comments

If it exists, a(8) > 100000.

Examples

			11 is a term since 11! = 39916800, and the numbers of odd and even digits are both 4.
29 is a term since 29!=8841761993739701954543616000000, and the numbers of odd and even digits are 16 and 15 respectively.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 500],
     Count[IntegerDigits[#!], _?OddQ] >=
       Count[IntegerDigits[#!], _?EvenQ] &]
  • Python
    from sympy import factorial as f
    def ok(n):
        s=str(f(n))
        return(sum(1 for k in s if k in '02468')<=sum(1 for k in s if k in '13579'))
    print([n for n in range(501) if ok(n)])
    
  • Python
    from math import factorial
    from itertools import count, islice
    def A360181_gen(startvalue=0): # generator of terms >= startvalue
        f = factorial(m:=max(startvalue,0))
        for k in count(m):
            if len(s:=str(f)) <= sum(1 for d in s if d in {'1','3','5','7','9'})<<1:
                yield k
            f *= k+1
    A360181_list = list(islice(A360181_gen(),7)) # Chai Wah Wu, May 10 2023

A363743 a(n) = floor(sqrt(log_10(n!))).

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 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, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11
Offset: 0

Views

Author

Paul F. Marrero Romero, Aug 17 2023

Keywords

Comments

Every nonnegative integer occurs at least 4 times.
Each integer k > 14 appears fewer than k times.
The only integers k that occur exactly k times are 11, 13 and 14.

Crossrefs

Programs

  • Mathematica
    Array[Floor@ Sqrt[Log10[#!]] &, 93, 0]
  • PARI
    a(n) = sqrtint(log(n!)/log(10)); \\ Michel Marcus, Sep 27 2023

Formula

a(n) = floor(sqrt(A034886(n) - 1)).
a(n) = A000196(A034886(n) - 1).
Previous Showing 41-46 of 46 results.