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.

A037386 Every base 3 digit of n is a base 10 digit of n.

Original entry on oeis.org

1, 2, 10, 13, 20, 26, 102, 108, 109, 120, 121, 122, 124, 125, 152, 201, 210, 211, 212, 214, 215, 240, 241, 242, 702, 720, 728, 810, 1000, 1002, 1003, 1008, 1009, 1011, 1012, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List ((\\), nub)
    a037386 n = a037386_list !! (n-1)
    a037386_list = filter f [1..] where
       f x = null $ nub (ds 3 x) \\ nub (ds 10 x)
       ds b x = if x > 0 then d : ds b x' else []  where (x', d) = divMod x b
    -- Reinhard Zumkeller, May 30 2013