The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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

%I #27 Jan 12 2022 21:00:25

%S 2,4,6,8,20,24,28,24,288,20,22,24,26,28,60,48,68,288,228,40,42,44,46,

%T 48,200,208,486,84,406,60,62,64,66,68,280,288,222,228,468,80,82,84,86,

%U 88,2880,460,282,240,686,200,204,208,424,486,220,224,228,406,826

%N a(n) is the smallest proper multiple of n which contains only even digits.

%C Inspired by the problem 1/2 of International Mathematical Talent Search, round 2 (see link).

%C Differs from A061807 when n is in A014263. - _Michel Marcus_, Jan 05 2022

%H Chai Wah Wu, <a href="/A350538/b350538.txt">Table of n, a(n) for n = 1..10000</a>

%H International Mathematical Talent Search, <a href="https://www2.cms.math.ca/Competitions/IMTS/imts2.html">Problem 1/2</a>, Round 2.

%e a(9) = 288 = 32 * 9 is the smallest multiple of 9 which contains only even digits.

%t a[n_] := Module[{k = 2*n}, While[! AllTrue[IntegerDigits[k], EvenQ], k += n]; k]; Array[a, 60] (* _Amiram Eldar_, Jan 05 2022 *)

%o (Python)

%o def a(n):

%o m, inc = 2*n, n if n%2 == 0 else 2*n

%o while not set(str(m)) <= set("02468"): m += inc

%o return m

%o print([a(n) for n in range(1, 60)]) # _Michael S. Branicky_, Jan 05 2022

%o (Python)

%o from itertools import count, product

%o def A350538(n):

%o for l in count(len(str(n))-1):

%o for a in '2468':

%o for b in product('02468',repeat=l):

%o k = int(a+''.join(b))

%o if k > n and k % n == 0:

%o return k # _Chai Wah Wu_, Jan 12 2022

%o (PARI) a(n) = my(k=2); while(#select(x->((x%2) == 1), digits(k*n)), k++); k*n; \\ _Michel Marcus_, Jan 12 2022

%Y Cf. A061807, A350536.

%Y Terms belong to A014263.

%K nonn,base

%O 1,1

%A _Bernard Schott_, Jan 05 2022

%E More terms from _Michael S. Branicky_, Jan 05 2022

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 May 12 19:25 EDT 2024. Contains 372494 sequences. (Running on oeis4.)