package hu.oeis; import java.util.ArrayList; import java.util.Collections; public class NoConcat0 { static final int maxNum=50000; // this is the maximum number we check if fits to the sequence static final int startAt=0; // starting number static final boolean formatOfBFile=true; // if true it prints indexes to being compatible with OEIS b-file static final int base=2; // the number base, recommended 2 public static void main(String[] args) { noConcat(startAt); } private static class NumberDigits { public NumberDigits(int v,int base) { value=v; if (v==0) bits.add(0); while (v>0) { bits.add(v%base); v=v/base; } Collections.reverse(bits); } public int value; public ArrayList bits=new ArrayList(); } // generate series, starting from number "start" // the next number is the smallest number that // - is greater than previous member // - the digits representation is NOT the concatenation of any two previous members private static void noConcat(int start) { int counter=0; ArrayList sequence=new ArrayList(); for (int nn=start;nn=newNumber.bits.size()) continue; int xx=0; for (xx=0;xx