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

A037441 Positive numbers having the same set of digits in base 8 and base 9.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 124, 177, 283, 568, 769, 906, 946, 1528, 1749, 1811, 1812, 1978, 2759, 3372, 3381, 4221, 5112, 5231, 6656, 6791, 6849, 6976, 7016, 7183, 7887, 8080, 8280, 8649, 8858, 8867, 8912, 8921, 8922, 8932, 10325, 10381, 10409, 10577
Offset: 1

Views

Author

Keywords

Examples

			283 is in the sequence because 283 in base 8 is 433 and in base 9 it is 344.
		

Crossrefs

Subsequence of A037405.

Programs

  • Mathematica
    Select[Range@ 11000, Union@ IntegerDigits[#, 8] == Union@ IntegerDigits[#, 9] &] (* Michael De Vlieger, Feb 18 2017 *)
  • PARI
    isok(n) = Set(digits(n, 8)) == Set(digits(n, 9)); \\ Michel Marcus, Feb 18 2017

Extensions

More terms from Don Reble, Apr 28 2006
Edited by John Cerkan, Feb 17 2017
Showing 1-2 of 2 results.