A337598 a(n) is the greatest number m not yet in the sequence such that the factorial base expansions of n and of m have the same digits (up to order but with multiplicity).
0, 1, 2, 3, 4, 5, 6, 8, 7, 9, 14, 15, 12, 13, 10, 11, 16, 17, 18, 20, 19, 21, 22, 23, 24, 30, 26, 32, 54, 56, 25, 31, 27, 33, 55, 57, 50, 51, 38, 39, 62, 63, 78, 80, 79, 81, 86, 87, 48, 49, 36, 37, 60, 61, 28, 34, 29, 35, 58, 59, 52, 53, 40, 41, 64, 65, 84, 85
Offset: 0
Examples
For n = 42: - the factorial base expansion of 42 is "1300", - there are four numbers m with the same multiset of digits: m fact(m) -- ------- 42 "1300" 73 "3001" 74 "3010" 78 "3100" - so a(42) = 78, a(73) = 74, a(74) = 73, a(78) = 42.
Links
Programs
-
PARI
See Links section.
Formula
a(n!) = n! for any n >= 0.
Comments