OFFSET
1,1
COMMENTS
Inspired by Problem 300 in Mathematical Excalibur, Vol. 13, No. 1, February-April, 2008.
LINKS
Michel Marcus, Table of n, a(n) for n = 1..1000
Kin Y. Li, Problem 300, Mathematical Excalibur, Vol. 13, No. 1, February-April, 2008.
MATHEMATICA
Table[k = 2; While[d = IntegerDigits[k*n]; If[OddQ[n], done = And @@ OddQ[d], done = And @@ EvenQ[d]]; ! done, k++]; k*n, {n, 100}] (* T. D. Noe, Oct 09 2012 *)
PROG
(PARI) digs(val, imod2) = {while(val, if ((val%10) % 2 != imod2, return (0)); val = floor(val/10); ); return (1); } digi(i, imod2) = {local(v); v = 2*i; while (! digs(v, imod2), v += i; ); return (v); } digv(n) = {local(i, v); for (i=1, n, v = digi(i, i % 2); print1(v, ", "); ); }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Marcus, Oct 07 2012
STATUS
approved