[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A136759
a(n) = leading digit of n! in base 8.
14
1, 1, 2, 6, 3, 1, 1, 1, 1, 1, 1, 2, 3, 5, 1, 2, 4, 1, 2, 6, 2, 5, 1, 5, 2, 6, 2, 1, 3, 1, 6, 3, 1, 6, 3, 1, 1, 4, 2, 1, 1, 5, 3, 2, 1, 1, 7, 5, 3, 2, 2, 1, 1, 1, 1, 7, 6, 5, 5, 4, 4, 4, 4, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 7, 1, 1, 1, 1, 2, 2, 3, 4, 5, 7, 1, 1, 2, 2, 4, 5, 7, 1, 2, 2, 4, 6, 1, 1, 2, 4
OFFSET
0,3
LINKS
MAPLE
f:= proc(n) local v; v:= n!; floor(v/8^floor(ilog2(v)/3)) end proc:
map(f, [$1..100]); # Robert Israel, Jun 07 2018
MATHEMATICA
Array[IntegerDigits[#!, 8][[1]]&, 100, 0] (* Vincenzo Librandi, Jun 07 2018 *)
PROG
(PARI) a(n) = digits(n!, 8)[1]; \\ Michel Marcus, Jan 27 2015
KEYWORD
base,easy,nonn
AUTHOR
Carl R. White, Jan 21 2008
STATUS
approved