The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A360181 Numbers k such that the number of odd digits in k! is greater than or equal to the number of even digits. 0
0, 1, 11, 29, 36, 193, 281 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
If it exists, a(8) > 100000.
LINKS
EXAMPLE
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.
MATHEMATICA
Select[Range[0, 500],
Count[IntegerDigits[#!], _?OddQ] >=
Count[IntegerDigits[#!], _?EvenQ] &]
PROG
(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
CROSSREFS
Sequence in context: A153768 A371106 A371054 * A092194 A134307 A279775
KEYWORD
nonn,base,more,less
AUTHOR
Zhining Yang, Jan 28 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 3 10:43 EDT 2024. Contains 373060 sequences. (Running on oeis4.)