|
EXAMPLE
|
For n=3: The permutations of {1, 2, 3} are {{1}, {2}, {3}, {1, 2}, {1, 3}, {2, 1}, {2, 3}, {3, 1}, {3, 2}, {1, 2, 3}, {1, 3, 2}, {2, 1, 3}, {2, 3, 1}, {3, 1, 2}, {3, 2, 1}}, the concatenations are {1, 2, 3, 12, 13, 21, 23, 31, 32, 123, 132, 213, 231, 312, 321}, and the primes are {2, 3, 13, 23, 31}, so a(3) = 5.
|