a.
If s(n)=2 and n is odd, then an=21. The only solutions with these properties are of the form n=10k+1, with k∈N∗.
b.
Let n be a positive integer such that an={s(n)n}=61.
Since s(n)n−⌊s(n)n⌋=61, we infer that 6n−6⋅s(n)⋅⌊s(n)n⌋=s(n) (1). From here follows that 6∣s(n), therefore 3∣n. Consider n=3k and s(n)=6m, with m,k positive integers. From (1) we deduce that 3k−6m⋅⌊2mk⌋=m, hence 3∣m. Consequently m=3u, with u∈N∗ and s(n)=18u, therefore 9∣n.
Consider n=9v, with v a positive integer. From (1) we obtain 3v−6u⋅⌊2uv⌋=u, hence 3∣u. Consider u=3t, with t a positive integer. It follows that m=9t and s(n)=54t, and the minimal sum of the digits of the natural number n is 54.
The smallest positive integer with the sum of its digits 54 is n=999999.
But a999999={54999999}=21, hence n=999999 is not a solution. The next positive integer with the sum of its digits 54 is n=1899999, for which we have a1899999={541899999}={35185+61}=61, therefore nmin=1899999.