A255724 List of numbers such that no number, nor its reverse, is in the concatenation of all previous terms.
Examples
After listing 1..11, 12 is not listed as "12" is found in the concatenated earlier terms. After continuing with 13..18, 19 is not listed as "91" is likewise found.
Crossrefs
Programs
-
PARI
lista(nn) = my(d, v=[]); for(n=1, nn, for(i=0, #v-#d=digits(n), (v[i+1..i+#d]==d || v[i+1..i+#d]==Vecrev(d)) && next(2)); print1(n, ", "); v=concat(v, d)) \\ Jinyuan Wang, Aug 23 2021
-
Perl
$s="";$=0;do{$++;if(index($s,$)<0 && index($s,reverse)<0){print("$ ");$s.=$_}}while(1);
Comments