OFFSET
1,2
COMMENTS
The bases in which n = func(n) are 2, 2, 4, 6, 6, 11, 5, 24, 24, 28, 10, 47, 120, 120, 240, 239, 15, 15, 720, 720, 27, 822. Note multiple bases for some n, e.g. 25 = 4! + 1! in base 6 and 25 = 1! + 4! in base 21; 721 = 6! + 1! in base 120 and 721 = 1! + 6! in base 715.
LINKS
Wikipedia, Factorion
FORMULA
s = 0; for digit(i=1..j) of n in base b, s = s + digit(i)!.
EXAMPLE
1 = 1! = 1 (base>=2).
2 = 1! + 0! = 1 + 1 = 10 (b=2).
7 = 1! + 3! = 1 + 6 = 13 (b=4).
25 = 4! + 1! = 24 + 1 = 41 (b=6).
26 = 4! + 2! = 24 + 2 = 42 (b=6).
48 = 4! + 4! = 24 + 24 = 44 (b=11).
49 = 1! + 4! + 4! = 1 + 24 + 24 = 144 (b=5).
121 = 5! + 1! = 120 + 1 = 51 (b=24).
122 = 5! + 2! = 120 + 2 = 52 (b=24).
144 = 5! + 4! = 120 + 24 = 54 (b=28).
145 = 1! + 4! + 5! = 1 + 24 + 120 (b=10).
240 = 5! + 5! = 120 + 120 = 55 (b=47).
PROG
(PARI) isok(n) = {if (n==1, return (1)); for (b=2, n, d = digits(n, b); if (sum(i=1, #d, d[i]!) == n, return (1)); ); return (0); } \\ Michel Marcus, Jun 21 2014
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Anthony Sand, Jun 20 2014
STATUS
approved