login
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).
4
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,3
COMMENTS
Leading 0's are ignored.
This sequence is a permutation of the nonnegative integers, which preserves the number of digits (A084558) and the sum of digits (A034968) in factorial base.
FORMULA
a(n!) = n! for any n >= 0.
EXAMPLE
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.
PROG
(PARI) See Links section.
CROSSREFS
See A333658 and A333659 for similar sequences.
Sequence in context: A078840 A358124 A333658 * A383961 A333221 A185974
KEYWORD
nonn,look,base
AUTHOR
Rémy Sigrist, Sep 02 2020
STATUS
approved