login
In binary representation: numbers not occurring in their factorial.
5

%I #13 May 01 2021 13:13:37

%S 0,5,11,13,15,17,31,37,55,81,164,395,513,517,619,1041,1287,1538,2108,

%T 2116,2137,2138,2282,2352,2363,2432,2466,2524,4278,4511,4758,4766,

%U 4852,4854,5136,5586,8396,8463,8883,9707,10351,16528,17279,19469,21244,24472

%N In binary representation: numbers not occurring in their factorial.

%C A093684(a(n)) = 0, complement of A093686.

%e 5! = 1*2*3*4*5 = 120 -> '1111000', in which '101'=5 is not contained, so 5 is in the sequence.

%t f[n_] := ToString[ FromDigits[ IntegerDigits[n, 2]]]; Select[ Range[ 29000], StringPosition[ f[ #! ], f[ # ]] == {} &] (* _Robert G. Wilson v_, Apr 15 2004 *)

%o (Python)

%o def aupto(limit):

%o kfact, alst = 1, [0]

%o for k in range(1, limit+1):

%o kb, kfact = bin(k)[2:], kfact * k

%o kfactb = bin(kfact)[2:]

%o if kb not in kfactb: alst.append(k)

%o return alst

%o print(aupto(25000)) # _Michael S. Branicky_, May 01 2021

%Y Cf. A036603, A007088, A000142, A093826.

%K nonn,base

%O 1,2

%A _Reinhard Zumkeller_, Apr 10 2004

%E More terms from _Robert G. Wilson v_, Apr 15 2004