OFFSET
1,2
LINKS
EXAMPLE
n=5: 5!=1*2*3*4*5=120='1111000': 1='1', 2='10', 3='11' and 4='100' are contained, but not 5='101', therefore a(5)=4.
MATHEMATICA
f[n_] := ToString[ FromDigits[ IntegerDigits[n, 2]]]; g[n_] := Block[{c = 0, k = 1, s = f[n! ]}, While[k <= n, If[ StringPosition[ s, f[k]] != {}, c++ ]; k++ ]; c]; Table[ g[n], {n, 75}] (* Robert G. Wilson v, Apr 21 2004 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Apr 08 2004
STATUS
approved