A077533 Multiples of 3 using only prime digits (2, 3, 5 and 7).
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
Links
- David A. Corneth, Table of n, a(n) for n = 1..10000
- Index entries for 10-automatic sequences.
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