cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A078242 Smallest multiple of n using only digits 0 and 3.

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, Nov 23 2002

Keywords

Comments

a(n) = min{A169966(k): k > 1 and A169966(k) mod n = 0}. - Reinhard Zumkeller, Jan 10 2012

Crossrefs

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