login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
Chris Caldwell, The First 1,000 Primes
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
Sequence in context: A327914 A167844 A048528 * A085821 A183087 A056709
KEYWORD
base,nonn
AUTHOR
Parthasarathy Nambi, Aug 23 2009
EXTENSIONS
Edited by N. J. A. Sloane, Aug 24 2009
Sequence corrected and extended by Zak Seidov and Robert G. Wilson v, Aug 24 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 01:36 EDT 2024. Contains 371264 sequences. (Running on oeis4.)