Decision problems of finite automata design and related arithmetics