OFFSET
1,1
COMMENTS
Every positive integer that is not multiple of 20 is called an alternator (A110303) because it has a multiple in which parity of the decimal digits alternates (see link) and that is called an alternating integer (A030141).
If n is an alternator, n <> 20*k, k>=1, then a(n) is the smallest alternating multiple k*n, with k > 1.
If n is congruent to 0 mod 20, a(n) is set to zero to indicate that n is not an alternator.
This sequence is a variant of A110304, but here the smallest alternating multiple of n cannot be n, when n is an alternating integer.
LINKS
The IMO Compendium, Problem 6, 45th IMO 2004.
EXAMPLE
For n = 13, 2 * 13 = 26, 3 * 13 = 39, 4 * 13 = 52 that is alternating, so, a(13) = 52.
MATHEMATICA
altQ[n_] := (r = Mod[IntegerDigits[n], 2]) == Split[r, UnsameQ][[1]]; a[n_] := If[Divisible[n, 20], 0, Module[{k = 2*n}, While[!altQ[k], k += n]; k]]; Array[a, 100] (* Amiram Eldar, Apr 12 2021 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Apr 12 2021
STATUS
approved