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!)
A158075 Prime numbers p such that (the largest digit of p) - (the smallest digit of p) is prime. 1

%I #11 Feb 02 2019 18:49:34

%S 13,29,31,41,47,53,61,79,83,97,103,107,113,131,163,181,227,229,239,

%T 241,257,269,277,281,293,307,311,313,331,353,383,421,431,449,457,461,

%U 463,467,479,499,503,523,547,557,563,577,587,607,613,631,641,643,647,653

%N Prime numbers p such that (the largest digit of p) - (the smallest digit of p) is prime.

%H Harvey P. Dale, <a href="/A158075/b158075.txt">Table of n, a(n) for n = 1..1000</a>

%e 13 (3-1=2), 29 (9-2=7), 31 (3-1=2), 47 (7-4=3), 53 (5-3=2), etc.

%p a := proc (n) local nn, nnn: nn := convert(ithprime(n), base, 10): nnn := seq(nn[j], j = 1 .. nops(nn)): if isprime(max(nnn)-min(nnn)) then ithprime(n) end if end proc: seq(a(n), n = 1 .. 150); # _Emeric Deutsch_, Apr 01 2009

%t ldsdpQ[n_]:=Module[{idn=IntegerDigits[n]},PrimeQ[Max[idn]-Min[idn]]]; Select[Prime[Range[200]],ldsdpQ] (* _Harvey P. Dale_, Jun 10 2013 *)

%K nonn,base,less

%O 1,1

%A _Juri-Stepan Gerasimov_, Mar 12 2009

%E Missing terms (61,281,449,457,461,463,467,479,727,757,769) added by _Emeric Deutsch_, Apr 01 2009

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 April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)