A296009 Smallest number m such that (2n-1)*m has only odd digits.
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 15, 5, 3, 5, 11, 1, 1, 1, 1, 1, 13, 13, 3, 11, 11, 1, 1, 1, 1, 1, 13, 5, 3, 5, 11, 1, 1, 1, 1, 1, 17, 11, 7, 11, 11, 1, 1, 1, 1, 1, 11, 5, 3, 5, 11, 1, 1, 1, 1, 1, 11, 11, 3, 11, 15, 1, 1, 1, 1, 1, 11, 5, 11, 5, 13
Offset: 1
Examples
For n = 11, 2n-1 = 21, 21*15 = 315 which has all odd digits. For m = 1 to 14, n*m listed are 21, 42, 63, 84, 105, 126, 147, 168, 189, 210, 231, 252, 273, 294, all of which contains at least one even digit.
Links
Programs
-
Mathematica
f[n_] := Block[{m = 1, nn = 2n -1, od = {1, 3, 5, 7, 9}}, While[ Union@ Join[od, IntegerDigits[m*nn]] != od, m += 2]; m]; Array[f, 75] (* Robert G. Wilson v, Dec 05 2017 *)
-
PARI
isok(n, m) = {my(d = digits((2*n-1)*m)); #select(x->((x%2)==0), d) == 0;} a(n) = {my(m=1); while (!isok(n, m), m++); m;} \\ Michel Marcus, Sep 24 2019
Formula
a(n) = A061808(n)/(2n-1).
Comments