Question: How to compute integer sequences involving concatenation?

I would appreciate seeing how Maple handles concatenation, digital sums and selection of related least terms. Here are two examples of problems currently of interest:

1. Construct the lexicographically earliest sequence of distinct positive integers such that the sum of the digits of the first n terms is coprime to their concatenation; first term is 1:


(I already have many terms for this, computed by a  Mathematica code, but would like to see it done in Maple).

2. Lexicographically earliest sequence of distinct positive integers such that the n-th term divides the concatenation of the first n terms; first term is 1:


(these terms found one by one, using Maple in manual mode, no code).

Thanks in advance for any assistance with this 





Please Wait...