login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A352991
Concatenation of all the distinct permutations of the first 1, 2, 3, ... (strictly) positive integers, arranged in ascending numerical order.
3
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,2
COMMENTS
This sequence differs from A030299 starting from a(409114) = 10123456789. All the permutations are listed once and only once (e.g., the concatenation of the permutations of the elements of the set {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} originates the number 1112345678910 which is a unique element of this sequence and appears only once, since 1_11_23456789 = 11_1_23456789 = 1112345678910).
A001292 is a subsequence of the present sequence. An open problem, published by Kenichiro Kashihara in 1996 (see References, p. 25, #30, Problem 2), is to find how many terms of A001292 (which is a subsequence of A030299) are powers of integers; Kashihara conjectured that there are none (even if, clearly, A001292(1) = 1 should be disregarded in order to keep the conjecture alive). Currently, only the terms up to the prime a(409120) = 10123457689 have been directly checked by the author of this sequence and no nontrivial perfect power has been found. On the other hand, many (maybe infinitely many) terms of the present sequence are nontrivial powers of integers (e.g., A352329(2) to A352329(36) are squares of integers and belong to this sequence).
Although A181129 is a subsequence of the present one, so that A181129(1) = a(19) = 2341, a(14) is the smallest prime in this sequence.
The number of digits of a(n) comes from A058183. There are exactly k! (Cf. A000142) terms having A058183(k) digits. - David A. Corneth, Apr 17 2022
REFERENCES
Kenichiro Kashihara, Comments and Topics on Smarandache Notions and Problems, 25. Erhus University Press, Arizona, 1996. ISBN: 1-879585-55-3.
EXAMPLE
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).
PROG
(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
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Marco Ripà, Apr 16 2022
STATUS
approved