A333440 Numbers where each digit can be paired with a digit of the same value at another position so that two pairs can be nested but cannot otherwise overlap.
0, 11, 22, 33, 44, 55, 66, 77, 88, 99, 1001, 1100, 1111, 1122, 1133, 1144, 1155, 1166, 1177, 1188, 1199, 1221, 1331, 1441, 1551, 1661, 1771, 1881, 1991, 2002, 2112, 2200, 2211, 2222, 2233, 2244, 2255, 2266, 2277, 2288, 2299, 2332, 2442, 2552, 2662, 2772, 2882
Offset: 1
Examples
The digits of 5586557768 can be paired as follows: (55)(8(6(55)(77)6)8) so 5586557768 belongs to this sequence.
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..4159 (terms < 10^6)
Programs
-
PARI
is(n, base=10) = { my (u=0, s=0); while (n, my (d=n%base); if (u && s%base==d, u--; s\=base, u++; s=s*base+d); n\=base); u==0 }
Formula
11 | a(n). - David A. Corneth, Mar 07 2021
Comments