A087596 Largest n-digit member of A087593. Define dd(k) = the number formed by concatenating the absolute difference of successive digits of k. Sequence contains largest n-digit prime p such that dd(p) is also prime.
97, 997, 9967, 99989, 999907, 9999907, 99999989, 999999607, 9999999967, 99999999947, 999999999989, 9999999999701, 99999999999923, 999999999999989, 9999999999999887, 99999999999999997, 999999999999999989
Offset: 2
Examples
a(5) = 99989 and dd(99989) = 0011 = 11 is a prime.
Programs
-
Mathematica
npr[n_]:=Module[{pr=NextPrime[10^n,-1]},While[!PrimeQ[FromDigits[Abs[ Differences[ IntegerDigits[pr]]]]],pr=NextPrime[pr,-1]];pr]; Array[ npr,20,2] (* Harvey P. Dale, Mar 06 2012 *)
Extensions
More terms from David Wasserman, Jun 15 2005
Comments