OFFSET
0,3
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..5040
FORMULA
EXAMPLE
Factorial base representation (A007623) of 2 is "10", zeroing all except the most significant digit does not change anything, thus a(2) = 2.
Factorial base representation (A007623) of 3 is "11", zeroing all except the most significant digit gives "10", thus a(3) = 2.
Factorial base representation of 23 is "321", zeroing all except the most significant digit gives "300" which is factorial base representation of 18, thus a(23) = 18.
PROG
(Python)
from sympy import factorial as f
def a007623(n, p=2): return n if n<p else a007623(n//p, p+1)*10 + n%p
def a(n):
x=str(a007623(n))
return int(x[0])*f(len(x))
print([a(n) for n in range(201)]) # Indranil Ghosh, Jun 21 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, May 04 2015
STATUS
approved