login
A267690
Numbers n such that replacing any single decimal digit d with d/3 produces a prime (obviously n can contain only digits 3, 6 or 9).
0
6, 9, 33, 63, 633
OFFSET
1,1
EXAMPLE
633 belongs to this sequence because 631, 613 and 233 are all prime.
MATHEMATICA
Select[FromDigits /@ Flatten[Map[Tuples[{3, 6, 9}, #] &, Range@ 3], 1], Function[n, AllTrue[Function[k, FromDigits@ MapAt[#/3 &, k, #] & /@ Range@ Length@ k]@ IntegerDigits@ n, And[PrimeQ@ #, # != n] &]]] (* Michael De Vlieger, Jan 20 2016, Version 10 *)
CROSSREFS
Cf. A008585.
Sequence in context: A147415 A217048 A105866 * A084007 A046634 A166624
KEYWORD
nonn,base,fini,full
AUTHOR
STATUS
approved