A381771 For any n > 0, a(n) is the least positive multiple of n whose factorial base expansion has digits in nonincreasing order; a(0) = 0.
0, 1, 2, 3, 4, 5, 6, 14, 8, 9, 20, 22, 12, 65, 14, 15, 16, 17, 18, 57, 20, 21, 22, 23, 24, 150, 78, 54, 56, 87, 30, 62, 32, 33, 102, 105, 72, 111, 114, 78, 80, 574, 84, 86, 88, 90, 92, 94, 48, 294, 150, 102, 104, 424, 54, 110, 56, 57, 116, 118, 60, 305, 62, 63
Offset: 0
Examples
The first terms, alongside their factorial base expansion, are: n a(n) fact(a(n)) -- ---- ---------- 0 0 0 1 1 1 2 2 1,0 3 3 1,1 4 4 2,0 5 5 2,1 6 6 1,0,0 7 14 2,1,0 8 8 1,1,0 9 9 1,1,1 10 20 3,1,0 11 22 3,2,0 12 12 2,0,0 13 65 2,2,2,1 14 14 2,1,0 15 15 2,1,1
Links
Programs
-
PARI
is(n) = { my (p = -1); for (r = 2, oo, if (n==0, return (1), p > p = n%r, return (0)); n \= r;); } a(n) = { for (k = 1, oo, if (is(k*n), return (k*n););); }
-
Python
from itertools import count def facbase(n, i=2): return [n] if n < i else [*facbase(n//i, i=i+1), n%i] def is_non_inc(n): return (fb:=facbase(n)) == sorted(fb, reverse=True) def a(n): return next(k*n for k in count(1) if is_non_inc(k*n)) print([a(n) for n in range(64)]) # Michael S. Branicky, Mar 09 2025
Comments