A078242 Smallest multiple of n using only digits 0 and 3.
3, 30, 3, 300, 30, 30, 3003, 3000, 333, 30, 33, 300, 3003, 30030, 30, 30000, 33303, 3330, 33003, 300, 3003, 330, 330303, 3000, 300, 30030, 333333333, 300300, 3303303, 30, 333033, 300000, 33, 333030, 30030, 33300, 333, 330030, 3003, 3000, 33333
Offset: 1
Links
- Reinhard Zumkeller and Chai Wah Wu, Table of n, a(n) for n = 1..10000 First 1000 terms from Reinhard Zumkeller
Programs
-
Haskell
a078242 n = head [x | x <- tail a169966_list, mod x n == 0] -- Reinhard Zumkeller, Jan 10 2012
-
Mathematica
With[{lst=Rest[FromDigits/@Tuples[{0,3},10]]},Table[SelectFirst[lst,Mod[#,n]==0&],{n,50}]] (* Harvey P. Dale, May 31 2025 *)
-
Python
def A078242(n): if n > 0: for i in range(1,2**n): x = 3*int(bin(i)[2:]) if not x % n: return x return 0 # Chai Wah Wu, Dec 31 2014
Extensions
More terms from Ray Chandler, Jul 12 2004
Comments