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.

Showing 1-2 of 2 results.

A037406 Numbers k such that every base-8 digit of k is a base-10 digit of k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 45, 105, 127, 235, 274, 365, 436, 487, 614, 713, 731, 1017, 1024, 1025, 1026, 1032, 1042, 1124, 1162, 1206, 1233, 1234, 1235, 1243, 1273, 1426, 1462, 1603, 1630, 1653, 1723, 1737, 1739, 1743, 1753, 2048
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List ((\\), nub)
    a037406 n = a037406_list !! (n-1)
    a037406_list = filter f [1..] where
       f x = null $ nub (ds 8 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
    
  • Mathematica
    b8dQ[n_]:=Module[{idn=Union[IntegerDigits[n]],idn8=Union[IntegerDigits[n,8]]},And@@Table[MemberQ[idn,idn8[[i]]],{i,Length[idn8]}]]
    Select[Range[2100],b8dQ]  (* Harvey P. Dale, Feb 27 2011 *)
  • Python
    def ok(n): return set(oct(n)[2:]) <= set(str(n))
    print(list(filter(ok, range(1, 2049)))) # Michael S. Branicky, Aug 22 2021

A308493 Numbers k such that k in base 10 contains the same digits as k in some other base.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 20, 21, 23, 31, 41, 42, 43, 46, 51, 53, 61, 62, 63, 71, 73, 81, 82, 83, 84, 86, 91, 93, 100, 101, 102, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, 123, 131, 133, 141, 144, 151, 155, 158, 161, 166, 171, 177, 181
Offset: 1

Views

Author

Jinyuan Wang, Aug 05 2019

Keywords

Comments

Supersequence of A034294 and A307498.
This sequence is infinite because 2*10^k is a term for any k >= 0.
Also 10^k is a term when k >= 0 and so too 10^k*(10^m - 1)/9 for any k > 0 and m >= 0. - Bruno Berselli, Aug 26 2019

Examples

			k = 113 is in the sequence because the set of digits of k {1, 3} equals the set of digits of (k in base 110) = 13.
		

Crossrefs

Programs

  • PARI
    isok(k) = {my(j=Set(digits(k))); for(b=2, k+1, if((b!=10) && (Set(digits(k, b)) == j), return(1))); return(0);} \\ Michel Marcus, Aug 05 2019
Showing 1-2 of 2 results.