OFFSET
1,1
COMMENTS
The sequence takes a surprisingly large number of computations to generate since the number of permutations rises quickly with the number of digits. Generating the sequence is an excellent programming exercise since there are several approaches to calculate the same sequence. Regardless of approach, there are many ways to optimize the algorithms, so the sequence would be a good choice of assignment for a contest between programmers. The assignment also has some pitfalls, mainly due to the problem of how to handle leading zeros.
The sequence was originally explored for the development of two puzzles found in the science fiction novel "The Right Left" by Andreas Boe.
REFERENCES
Andreas Boe, The Right Left, Amazon books, 2014.
LINKS
Andreas Boe, Table of n, a(n) for n = 1..9596
EXAMPLE
190 -> 019 (forbidden), 091 (forbidden), 109 (prime), 190 (even), 901 (composite), 910 (even) -> Conclusion: One prime number.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Andreas Boe, Aug 22 2014
STATUS
approved