login
Primes p such that p - d is also prime, where d is the smallest nonzero digit of p.
6

%I #22 Sep 08 2022 08:46:09

%S 47,67,229,283,467,523,607,647,823,829,2029,2083,2089,2239,2269,2383,

%T 2593,2659,2689,2803,3253,3259,3529,3823,4007,4243,4273,4423,4723,

%U 4787,5023,5233,6047,6079,6679,6709,6829,6869,6967,6977,6997,7687,8089,8233,8293

%N Primes p such that p - d is also prime, where d is the smallest nonzero digit of p.

%C The least significant digit of a(n) is either 3, 7 or 9. - _Colin Barker_, Aug 03 2014

%C The smallest nonzero digit of a(n) is 2, 4, 6 or 8. - _Colin Barker_, Aug 04 2014

%H Jens Kruse Andersen, <a href="/A245745/b245745.txt">Table of n, a(n) for n = 1..10000</a>

%e 607 is in the sequence because 607 - 6 = 601, which is prime.

%o (PARI) select(p->v=vecsort(digits(p),,8); isprime(p-v[1+!v[1]]), primes(2000))

%o (Magma) [p: p in PrimesUpTo(9000) | IsPrime(p-d) where d is [i: i in Set(Intseq(p)) | not IsZero(i)][1]]; // _Bruno Berselli_, Jul 31 2014

%Y Cf. A245742, A245743, A245744.

%K nonn,base

%O 1,1

%A _Colin Barker_, Jul 31 2014