A383322 Lexicographically earliest sequence of distinct terms such that replacing each term k with k! does not change the succession of digits.
1, 2, 198, 15, 5, 24, 3, 0, 56, 4, 800, 260, 18, 181, 7, 120, 43, 26, 25, 78, 46, 6, 11, 45, 67, 2580, 8, 37, 34, 49, 61, 66, 465, 63, 9, 28, 62, 93, 960, 65, 410, 626, 13, 82, 98, 59, 32, 659, 453, 242, 255, 580, 939, 42, 70, 44, 932, 22, 55, 38, 389, 50
Offset: 1
Examples
Let b(n) = a(n)! (a(n)): 1, 2, 198, 15, 5, 24, 3, 0, 56, 4, 800, 260, 18, ... (b(n)): 1, 2, 198155243056480026018[...] (350 digits omitted), ...
Links
- Dominic McCarty, Table of n, a(n) for n = 1..10000
- Dominic McCarty, Table of n, a(n)! for n = 1..100
Programs
-
Python
from sympy import factorial from itertools import count a, sa, sb = [1, 2, 198], "12198", "12"+str(factorial(198)) for _ in range(20): a.append(next(n for k in count(1) if not (n := int(sb[len(sa):len(sa)+k])) in a and (0 not in a or not (len(sb) > len(sa) + k and sb[len(sa) + k] == "0")))) sa += str(a[-1]); sb += str(factorial(a[-1])) print(a)
Comments