Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #19 Sep 08 2020 15:18:42
%S 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,
%T 26,32,54,56,25,31,27,33,55,57,50,51,38,39,62,63,78,80,79,81,86,87,48,
%U 49,36,37,60,61,28,34,29,35,58,59,52,53,40,41,64,65,84,85
%N 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).
%C Leading 0's are ignored.
%C 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.
%H Rémy Sigrist, <a href="/A337598/b337598.txt">Table of n, a(n) for n = 0..5039</a>
%H Rémy Sigrist, <a href="/A337598/a337598.png">Scatterplot of the first 9! terms</a>
%H Rémy Sigrist, <a href="/A337598/a337598.gp.txt">PARI program for A337598</a>
%H <a href="/index/Fa#facbase">Index entries for sequences related to factorial base representation</a>
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F a(n!) = n! for any n >= 0.
%e For n = 42:
%e - the factorial base expansion of 42 is "1300",
%e - there are four numbers m with the same multiset of digits:
%e m fact(m)
%e -- -------
%e 42 "1300"
%e 73 "3001"
%e 74 "3010"
%e 78 "3100"
%e - so a(42) = 78,
%e a(73) = 74,
%e a(74) = 73,
%e a(78) = 42.
%o (PARI) See Links section.
%Y See A333658 and A333659 for similar sequences.
%Y Cf. A034968, A084558.
%K nonn,look,base
%O 0,3
%A _Rémy Sigrist_, Sep 02 2020