OFFSET
1,2
EXAMPLE
5! = 1*2*3*4*5 = 120 -> '1111000', in which '101'=5 is not contained, so 5 is in the sequence.
MATHEMATICA
f[n_] := ToString[ FromDigits[ IntegerDigits[n, 2]]]; Select[ Range[ 29000], StringPosition[ f[ #! ], f[ # ]] == {} &] (* Robert G. Wilson v, Apr 15 2004 *)
PROG
(Python)
def aupto(limit):
kfact, alst = 1, [0]
for k in range(1, limit+1):
kb, kfact = bin(k)[2:], kfact * k
kfactb = bin(kfact)[2:]
if kb not in kfactb: alst.append(k)
return alst
print(aupto(25000)) # Michael S. Branicky, May 01 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Apr 10 2004
EXTENSIONS
More terms from Robert G. Wilson v, Apr 15 2004
STATUS
approved