|
|
A164739
|
|
Prime numbers in which the difference between the largest digit and the smallest digit is a digit in the same prime.
|
|
1
|
|
|
101, 103, 107, 109, 167, 211, 257, 307, 347, 401, 409, 431, 463, 487, 503, 509, 523, 541, 563, 601, 607, 617, 643, 653, 701, 709, 743, 761, 809, 853, 907, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
The difference between the largest digit (7) and the smallest digit (1) in the prime 167 is also in the same prime. The difference between the largest digit (9) and the smallest digit (0) in the prime 409 is also in the same prime. The difference between the largest digit (8) and the smallest digit (3) in the prime 853 is also in the same prime.
|
|
MATHEMATICA
|
ss={}; Do[id=IntegerDigits[p=Prime[n]]; If[MemberQ[id, Max[id]-Min[id]], AppendTo[ss, p]], {n, 2000}]; ss (* Zak Seidov, Aug 24 2009 *)
fQ[n_] := Block[{id = Union@ IntegerDigits@ n}, MemberQ[id, id[[ -1]] - id[[1]] ]]; Select[ Prime@ Range@ 185, fQ@# &] (* Robert G. Wilson v, Aug 24 2009 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|