login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A350538 a(n) is the smallest proper multiple of n which contains only even digits. 4
2, 4, 6, 8, 20, 24, 28, 24, 288, 20, 22, 24, 26, 28, 60, 48, 68, 288, 228, 40, 42, 44, 46, 48, 200, 208, 486, 84, 406, 60, 62, 64, 66, 68, 280, 288, 222, 228, 468, 80, 82, 84, 86, 88, 2880, 460, 282, 240, 686, 200, 204, 208, 424, 486, 220, 224, 228, 406, 826 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Inspired by the problem 1/2 of International Mathematical Talent Search, round 2 (see link).
Differs from A061807 when n is in A014263. - Michel Marcus, Jan 05 2022
LINKS
International Mathematical Talent Search, Problem 1/2, Round 2.
EXAMPLE
a(9) = 288 = 32 * 9 is the smallest multiple of 9 which contains only even digits.
MATHEMATICA
a[n_] := Module[{k = 2*n}, While[! AllTrue[IntegerDigits[k], EvenQ], k += n]; k]; Array[a, 60] (* Amiram Eldar, Jan 05 2022 *)
PROG
(Python)
def a(n):
m, inc = 2*n, n if n%2 == 0 else 2*n
while not set(str(m)) <= set("02468"): m += inc
return m
print([a(n) for n in range(1, 60)]) # Michael S. Branicky, Jan 05 2022
(Python)
from itertools import count, product
def A350538(n):
for l in count(len(str(n))-1):
for a in '2468':
for b in product('02468', repeat=l):
k = int(a+''.join(b))
if k > n and k % n == 0:
return k # Chai Wah Wu, Jan 12 2022
(PARI) a(n) = my(k=2); while(#select(x->((x%2) == 1), digits(k*n)), k++); k*n; \\ Michel Marcus, Jan 12 2022
CROSSREFS
Terms belong to A014263.
Sequence in context: A169906 A251853 A061651 * A131122 A335209 A119261
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Jan 05 2022
EXTENSIONS
More terms from Michael S. Branicky, Jan 05 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 15:20 EDT 2024. Contains 371916 sequences. (Running on oeis4.)