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-3 of 3 results.

A037402 Numbers k such that every base-7 digit of k is a base-8 digit of k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 16, 24, 32, 40, 48, 57, 85, 94, 106, 114, 133, 142, 163, 171, 196, 204, 212, 220, 224, 225, 226, 227, 228, 229, 230, 236, 244, 277, 285, 305, 334, 342, 385, 392, 401, 540, 546, 547, 550, 597, 620, 629, 646, 688
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List ((\\), nub)
    a037402 n = a037402_list !! (n-1)
    a037402_list = filter f [1..] where
       f x = null $ nub (ds 7 x) \\ nub (ds 8 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
    b7b8Q[n_]:=Module[{idn7=Union[IntegerDigits[n,7]]},Intersection[ idn7, Union[ IntegerDigits[n,8]]]==idn7]; Select[Range[700],b7b8Q] (* Harvey P. Dale, Dec 15 2013 *)

A037403 Numbers k such that every base-7 digit of k is a base-9 digit of k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 31, 99, 106, 107, 195, 198, 248, 257, 284, 297, 321, 498, 514, 749, 750, 751, 758, 767, 785, 936, 939, 940, 943, 950, 968, 996, 1028, 1086, 1088, 1110, 1163, 1200, 1218, 1254, 1453, 1471, 1498, 1500, 1502, 1507
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

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

A037440 Positive numbers having the same set of digits in base 7 and base 10.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 23, 46, 265, 316, 1030, 1234, 1336, 1366, 1401, 1431, 1443, 1454, 1464, 2060, 2116, 3261, 3515, 3621, 4631, 5052, 10144, 10342, 10542, 11134, 11425, 11524, 11544, 12415, 12450, 12532, 12564, 12651, 13035, 13045, 13245
Offset: 1

Views

Author

Keywords

Examples

			1336 is in the sequence because 1336 in base 7 is 3616.
		

Crossrefs

Subsequence of A037404.
Cf. A007093.

Programs

  • Mathematica
    Select[Range@ 13300, Union@ IntegerDigits@ # == Union@ IntegerDigits[#, 7] &] (* Michael De Vlieger, Feb 18 2017 *)
  • PARI
    isok(n) = Set(digits(n, 7)) == Set(digits(n)); \\ Michel Marcus, Feb 18 2017
    
  • Python
    from sympy.ntheory import digits
    def ok(n): return set(map(int, str(n))) == set(digits(n, 7)[1:])
    print([k for k in range(1, 10**6) if ok(k)]) # Michael S. Branicky, Apr 22 2023

Extensions

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