The sequence is a cycle of emirps with the middle two digits of each
term the same as the second and next-to-last digits of the subsequent
I came across this puzzle on the OEIS as sequence A187399.
As Arkadiusz Wesolowski observed, the first six terms are each an emirp
— a prime that when written in reverse is a different prime. This is a
helpful but insufficient to uniquely continue the sequence, as there are
thousands of six-digit emirps.
Visual inspection of the terms of the sequence shows multiple repeated
digits from one term to the next. One such repetition pattern is present
in each sequential pair—the middle two digits become the second and
next-to-last digits in the next term. For example, the middle two digits
of the first term 12429793 are 2 and 9. Given the second term is a six
digits, it must take the form ?2??9? to continue the pattern.
Based on this condition, the seventh term, which is also given to be a
six digit number, must take the form ?0??9?. However, there are hundreds
of primes and 99 emirps that meet this condition.
If we further assume this to be a cyclic sequence, the middle two digits
would have to be 29 to fit with the first given term. This suggests that
the seventh term must take the form ?0299?.
There are only five primes of this form: 202999, 302999, 402991, 602999
and 702991. Only one of these primes is also an emirp: 702991.
While this is a unique solution for the six given terms, this is not the
only cyclic sequence of emirps with these properties. For instance, the
second term can be replaced with 924097 and meet the conditions
There does not appear to be a consistent relationship between the terms
governing the length of each term. However, given the first six terms,
there are no emirps shorter than six digits that meet the above
conditions for the seventh term. Six digits is the shortest emirp length
that uniquely continues the sequence.