The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A063792 Subtractive primes: p = x1x2x3..xk is a k-digit prime in base 10 such that abs(x1-x2-x3-...-xk) is also a prime. 4

%I

%S 2,3,5,7,13,29,31,41,47,53,61,79,83,97,103,113,131,139,151,157,193,

%T 199,223,227,241,263,269,281,317,337,353,359,373,379,397,401,409,433,

%U 443,461,463,487,503,521,557,571,593,599,601,613,617,631,647,653

%N Subtractive primes: p = x1x2x3..xk is a k-digit prime in base 10 such that abs(x1-x2-x3-...-xk) is also a prime.

%H Harry J. Smith, <a href="/A063792/b063792.txt">Table of n, a(n) for n = 1..1000</a>

%e 269 belong to the sequence because |2 - 6 - 9| = |-13| = 13.

%t okQ[n_] := Module[{idn = -1# & /@ IntegerDigits[n]}, PrimeQ[Plus @@ Rest[idn] - First[idn]]]; Select[Prime[Range[120]], okQ]

%o (PARI) SubD(x)= { local(s); s=0; while (x>9, s+=x-10*(x\10); x\=10); return(abs(s - x)) }

%o { n=0; p=0; for (m=1, 10^9, p=nextprime(p+1); if(isprime(SubD(p)), write("b063792.txt", n++, " ", p); if (n==1000, break)) ) } \\ _Harry J. Smith_, Aug 31 2009

%K easy,nonn,base

%O 1,1

%A _Felice Russo_, Aug 17 2001

%E Corrected by _Harvey P. Dale_, Aug 20 2001

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

Last modified September 25 07:27 EDT 2021. Contains 347654 sequences. (Running on oeis4.)