OFFSET
1,2
LINKS
Nick Hobson, Table of n, a(n) for n = 1..16383
Nick Hobson, C program.
EXAMPLE
a(7) = 5 since 7 = 111_2 (i.e., written in base 2) and 5! = 1111000_2 is the least factorial to have 111 as its most significant binary digits.
PROG
(PARI) A155891(n)={ local( F=1, k=1 ); while( F\1!=n, F*=k++; while( F>=n+1, F/=2 )); k}
(C) See Links section.
CROSSREFS
KEYWORD
base,nonn
AUTHOR
M. F. Hasler, Feb 01 2009
STATUS
approved