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.

A077533 Multiples of 3 using only prime digits (2, 3, 5 and 7).

Original entry on oeis.org

3, 27, 33, 57, 72, 75, 222, 225, 237, 252, 255, 273, 327, 333, 357, 372, 375, 522, 525, 537, 552, 555, 573, 723, 732, 735, 753, 777, 2223, 2232, 2235, 2253, 2277, 2322, 2325, 2337, 2352, 2355, 2373, 2523, 2532, 2535, 2553, 2577, 2727, 2733, 2757, 2772, 2775
Offset: 1

Views

Author

Amarnath Murthy, Nov 08 2002

Keywords

Crossrefs

Cf. A008585 (multiples of 3), A046034 (prime digits).

Programs

  • Mathematica
    ok3Q[n_]:=And@@(MemberQ[{2,3,5,7},#]&/@IntegerDigits[n]); Select[3Range[0,1000],ok3Q]  (* Harvey P. Dale, Mar 22 2011 *)
    Select[Flatten[Table[FromDigits/@Tuples[{2,3,5,7},n],{n,4}]],Mod[#,3]==0&] (* Harvey P. Dale, Feb 27 2025 *)
  • Python
    def pd(n): return set(str(n)) <= set("2357") # has only prime digits
    def aupto(limit): return [m for m in range(0, limit+1, 3) if pd(m)]
    print(aupto(3000)) # Michael S. Branicky, Mar 27 2021

Extensions

More terms from Sascha Kurz, Jan 03 2003