A352991 Concatenation of all the distinct permutations of the first 1, 2, 3, ... (strictly) positive integers, arranged in ascending numerical order.
1, 12, 21, 123, 132, 213, 231, 312, 321, 1234, 1243, 1324, 1342, 1423, 1432, 2134, 2143, 2314, 2341, 2413, 2431, 3124, 3142, 3214, 3241, 3412, 3421, 4123, 4132, 4213, 4231, 4312, 4321, 12345, 12354, 12435, 12453, 12534, 12543, 13245, 13254, 13425
Offset: 1
Examples
a(3) = 21, since the number of permutations of {1, 2} is 2! = 2 and the concatenation 1_2 is smaller than 2_1 (while {1} originates only a(1) = 1, so that a(2) = 21).
References
- Kenichiro Kashihara, Comments and Topics on Smarandache Notions and Problems, 25. Erhus University Press, Arizona, 1996. ISBN: 1-879585-55-3.
Programs
-
Python
from itertools import count, islice, permutations def agen(): # generator of terms for k in count(1): s = (int("".join(map(str, p))) for p in permutations(range(1, k+1))) yield from sorted(set(s)) print(list(islice(agen(), 42))) # Michael S. Branicky, Apr 16 2022
Comments