Created by Inder J. Taneja
Start with a prime and keep every prime child formed by adding a block on its right and the reversed block on its left. Each level branches to qualifying prime children within your limits. Adaptive mode uses the shortest successful block length for each parent.
A palindromic seed makes palindromic descendants. A nonpalindromic seed makes symmetric outer digits without making the whole number a palindrome.
Start with the palindromic prime 101. One-digit blocks give two prime children: 3 | 101 | 3 = 31013 and 9 | 101 | 9 = 91019. Explore each branch separately.
Block 39 produces a prime child, so this parent uses two-digit blocks.
No permitted two-digit block works for 91019. Adaptive mode tries three digits and finds block 111, among other prime children.
Every number in these two sample paths is a palindromic prime. The full tree keeps multiple prime children, subject to the selected limits.
Use seed 101, allowed digits 1234789, Adaptive block length, maximum block length 3, and 3 levels to explore this example and its further branches. Gold marks the added blocks; the vertical bars separate blocks and are not digits.