[Question]
  [
Inspired by [Find the largest fragile prime](https://codegolf.stackexchange.com/questions/41648/find-the-largest-fragile-prime).
By removing at least 1 digit from a positive integer, we can get a different non-negative integer. Note that this is different to the `Remove` function in the linked question. We say a prime number is delicate if all integers generated this way are not prime. For example, \$60649\$ generates the following integers:
```
0, 4, 6, 9, 49, 60, 64, 66, 69, 604, 606, 609, 649, 664, 669, 6049, 6064, 6069, 6649
```
None of these integers are prime, therefore \$60649\$ is a delicate prime. Note that any leading zeros are removed, and that the requirement is "not prime", so \$0\$ and \$1\$ both qualify, meaning that, for example, \$11\$ is a delicate prime.
Similar to the standard [sequence](/questions/tagged/sequence "show questions tagged 'sequence'") rule, you are to do one of the following tasks:
* Given a positive integer \$n\$, output two distinct, consistent\* values depending on whether \$n\$ is a delicate prime or not
* Given a positive integer \$n\$, output the \$n\$th delicate prime
* Given a positive integer \$n\$, output the first \$n\$ delicate primes
* Output infinitely the list of delicate primes
\*: You may choose to output two sets of values instead, where the values in the set correspond to your language’s definition of truthy and falsey. For example, a Python answer may output an empty list for falsey/truthy and a non-empty list otherwise.
You may choose which of the tasks you wish to do.
You can input and output in any [standard way](https://codegolf.meta.stackexchange.com/questions/2447/default-for-code-golf-input-output-methods), and, as this is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), shortest code in bytes wins
For reference, the first 20 delicate primes are:
```
2, 3, 5, 7, 11, 19, 41, 61, 89, 409, 449, 499, 881, 991, 6469, 6949, 9001, 9049, 9649, 9949
```
A couple more to look out for:
```
821 - False (Removing the 8 and the 1 gives 2 which is prime)
```
---
I'll offer a +100 bounty for an answer which implements one of the standard [sequence](/questions/tagged/sequence "show questions tagged 'sequence'") I/Os rather than the [decision-problem](/questions/tagged/decision-problem "show questions tagged 'decision-problem'") method, that either:
* is shorter than a naive [decision-problem](/questions/tagged/decision-problem "show questions tagged 'decision-problem'") implementation (please include such a version as proof if one hasn't already been posted)
* or that doesn't rely on checking whether values are delicate primes or not when generating values (e.g. may use the fact that only specific digits can occur, or something else that isn't simply slapping a "loop over numbers, finding delicate primes")
This is kinda subjective as to what counts as "checking for delicate primes", so I'll use my best judgement when it comes to awarding the bounty.
  
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 4 bytes
### Code
Uses the **05AB1E**-encoding. Checks whether the given number is a *delicate prime* or not.
```
æpJΘ
```
[Try it online!](https://tio.run/##yy9OTMpM/f//8LICr3Mz/v83MzGzBAA "05AB1E – Try It Online") or [Check for all numbers between 1 and 9949](https://tio.run/##yy9OTMpM/f@oYx6nklt@kUJiTo5CZl5JanpqUTGQoRBtqKNgpKOgp6ejAFQTqxTDpXBqkgKnkndqaoFCSUaqQl5pbhJIbXlGalEqWCQtPycnvzwzL10hs1ihpKg01UpBKeb/4WUFXudm/K/l4jIyOLSYU8m1oqQoMbkEoiOzqLhEwcgAZhhQuZmJmSUA).
## Explanation
```
æ      # Get the powerset of the number.
 p     # Check for each element whether it is a prime.
  J    # Join these numbers into one big number.
   Θ   # Check whether this joined number is equal to 1.
```
[Answer]
# [APL (Dyalog Extended)](https://github.com/abrudz/dyalog-apl-extended), ~~16~~ 14 bytes
```
</1⍭⍎⍕(⊢,,¨)\⍞
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT9dNrShJzUtJTfmf9qhtQvV/G33DR71rH/X2PeqdqvGoa5GOzqEVmjGPerf@r/2fpqBuZmBmYqnO9ah3R9qhFQpANWBys6GBAQA "APL (Dyalog Extended) – Try It Online")
-2 bytes (`∊⍎¨¨ → ⍎⍕`) thanks to @ngn.
Full program that takes a single number from stdin and prints 1 (true) or 0 (false).
The trick here is how it generates all non-empty subsequences:
* `(⊢,,¨)/ str` gives all subsequences of `str` which include the last character.
```
  (⊢,,¨)/ '1234'
→ '1' (⊢,,¨) '2' (⊢,,¨) '3' (⊢,,¨) '4'
→ '1' (⊢,,¨) '2' (⊢,,¨) '4' '34'
→ '1' (⊢,,¨) '4' '34' '24' '234'
→ '4' '34' '24' '234' '14' '134' '124' '1234'
```
* `(⊢,,¨)\ str` applies `(⊢,,¨)/` to each prefix of `str`, giving all non-empty subsequences as a list of lists of strings.
```
  (⊢,,¨)\ '1234'
→ '1' ('2' '12') ('3' '23' '13' '123') ('4' '34' '24' '234' '14' '134' '124' '1234')
```
Explanation of whole code:
```
</1⍭⍎⍕(⊢,,¨)\⍞
             ⍞  ⍝ Take n from stdin as a string
      (    )\   ⍝ For each prefix, reduce from right by
         ,¨     ⍝   prepend the previous char to each string
       ⊢,       ⍝   and append to the previous list of strings
    ⍎⍕          ⍝ Convert nested strings to a single string,
                ⍝ and then eval it to get a simple integer vector
  1⍭  ⍝ Test each number for primality
</    ⍝ Test if the only truth is the last one
```
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 7 6 bytes
```
ṗ⊇ᵘṗˢȮ
```
[Try it online!](https://tio.run/##SypKTM6ozMlPN/pvaAAEj@Yvq37UtuFRU5Na7elF5f8f7pz@qKv94dYZQMbpRSfW/f8PAA "Brachylog – Try It Online")
```
ṗ⊇ᵘṗˢȮ the implicit input
ṗ      is a prime
 ⊇ᵘ    and from every unique subset
   ṗˢ  select the primes
     Ȯ and this should be a list with one element (the prime input itself)
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 7 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
DŒPḌẒḄ’
```
A monadic Link accepting a positive integer which returns zero (falsey) if it's a delicate prime, or a non-zero integer (truthy) if not.
**[Try it online!](https://tio.run/##AR8A4P9qZWxsef//RMWSUOG4jOG6kuG4hOKAmf///zYwNjQ5 "Jelly – Try It Online")** Or see the [first twenty](https://tio.run/##ASEA3v9qZWxsef//RMWSUOG4jOG6kuG4hOKAmf/Dh8KsJDIwI/8 "Jelly – Try It Online").
### How?
```
DŒPḌẒḄ’ - Link: n         e.g. 824                      409
D       - decimal digits       [8,2,4]                  [4,0,9]
 ŒP     - power-set            [[],[8]...,[8,2,4]]      [[],[4],...,[4,0,9]]
   Ḍ    - undecimal            [0,8,2,4,82,84,24,824]   [0,4,0,9,40,49,9,409]
    Ẓ   - is prime?            [0,0,1,0,0,0,0,0]        [0,0,0,0,0,0,0,1]
     Ḅ  - from binary          32                       1
      ’ - decrement            31                       0
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 7 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
```
¥à f_°j
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=peAgZl%2bwag&input=IjYwNjQ5Ig) or [test `[0,1000)`](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LWY&header=cw&code=peAgZl%2bwag&input=MTAwMA)
```
¥à f_°j     :Implicit input of integer string
¥           :Is equal to
 à          :Combinations
   f        :Filter
    _       :By passing each through a function
     °      :Postfix increment, to cast to an integer
      j     :Is prime?
```
[Answer]
# [J](http://jsoftware.com/), 25 23 bytes
*-2 thanks to Jonah!*
Returns a list containing either 1 being truthy or 0 otherwise.
```
1</@p:(#~2#:@i.@^#)&.":
```
[Try it online!](https://tio.run/##HYrBCgIxDETvfsXQgruFbk3XWtugUBA8efIDvIiL60Xvgr9e0w3My2Qmr6pcN@HI6GBBYNHgcLpeztUfNuXDvf6Nmsvsyk2btVNczepxf77RS/N1ZVJkMDt4kjEYGKPF1mJnsbfwXpQtguwoSs1TQ2jIgpQkz7k9hCh3zK3KRC2mxceFktc/ "J – Try It Online")
### How it works
```
1</@p:(#~2#:@i.@^#)&.":
                   &.": convert the number to a string
      (  2      ^#)      2 ^ length
          #:@i.@         enumerated and to base 2
       #~                select from the string based on the bit mask
                   &.": convert from strings to numbers
1   p:                  primes -> 1, non-primes -> 0
                         so in the delicate prime case, we have
                         (2^L) - 1 zeros and one 1 for the input itself
 </@                    reduce from left to right with less-than
                         (so last position is 1, everything else 0)
```
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), ~~14~~ 8 bytes
```
qjfP_sTy
```
[Try it online!](https://tio.run/##K6gsyfj/vzArLSC@OKTy/38lc3Olf/kFJZn5ecX/dVMA "Pyth – Try It Online")
## Explanation
```
qjfP_sTy
  f       # filter
       y  # all subsets of input
   P_sT   # with a primality test
 j        # join result of filter on newlines
q         # check if it equals input
```
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 53 bytes
```
^
;
+%`;(.)
$1;$'¶$`;
.+
$*
%A`^.?$|^(..+)\1+$
^1+¶+$
```
[Try it online!](https://tio.run/##DcO7DYAgEADQ/uY4InjJRRQ/hMJYuYQhWFjYWBhL53IAFsN7ybuP57z2ovSaSoQApFLQbABtwCp/mAIwAdaglhR5xjdqZjKbJYRoKX@EpbjGg7OylZ10speDHOUkvf8B "Retina 0.8.2 – Try It Online") Link includes test cases. Explanation:
```
^
;
+%`;(.)
$1;$'¶$`;
```
Generate all subsequences of the input.
```
.+
$*
```
Convert then to unary.
```
%A`^.?$|^(..+)\1+$
```
Delete the ones that aren't prime, but don't delete the newlines. (A multiline replace also works, but is harder to format an explanation for.)
```
^1+¶+$
```
Check that the original input was prime but none of the proper subsequences were.
[Answer]
# [Scala](http://www.scala-lang.org/), ~~173~~ 170 bytes
```
n=>(s"$n".indices.toSet.subsets.filter{x=>1<x.size&x.size<s"$n".size}.map(_.toSeq.sorted.map(""+n).mkString.toInt).toSet+n).filter{x=>x>1&2.to(x/2).forall(x%_>0)}==Set(n)
```
[Try it online!](https://tio.run/##hVA9T8MwEN37K04WVLaIjBPSNKmaSDAgMTCVEalyWxcZXCfELoqo@tvDOQUqJoZ7d37vPu3W0si@Xr2qtYdHqS2oziu7cXDbNHAYjT6kge0MHqyHsoK7ujZKWih7W1bUkQtLuLYbvVaO@3qhPHf7lVPe8a02XrWHrqzieced/lTjk5ufqkJ45DvZ0OVQ@c5d3Xq1GShCrizju7eFb7V9QR3Hs9OAIJx7d1U8TlCg3XWCfN1KY2h3uawEO5YlplPLeoAG23hjKXlq92pG2AiAJBHcRDCJYBpBHKMVEaToM7Q8xCJAGqBAyHPkiyIkpBm@syJIhRCBFkOcDYg8XtcY7SmJgLDhIPytnx221H4fxMIeZzoT2OAPR57tvTTuZ2MBMaSQCEgnEAsB@TT7nfTfoGP/BQ "Scala – Try It Online")
[Answer]
# [R](https://www.r-project.org/), ~~163~~ 154 bytes
```
function(x,n=nchar(x),s=sum)(a=apply(!expand.grid(rep(list(0:1),n)),1,function(v)(y=s((x%/%10^(n:1-1)%%10)[v]*10^(s(v):1-1)))&s(!y%%1:y)==2))[1]&!s(a[-1])
```
[Try it online!](https://tio.run/##ZY/RboMwDEXf@xVBFZU9pVvcdZWKlC9BrIogjEg0jWLawtczYNoextuVfc@RHUfHl8q2rjSdvYTorlaP9d2Xnbt56KXXvmxMhB4la75fEYw2IbQDJLYPxlevX9FVEG2A1nEHKiOUHlGS/LM8EAbNAH36lpL6BJ/RnjCdMuaP4mUe8VRapog7hmSYltmAWh8Qcyp2CYPJ91Tg@lo4qdPxjGIrliAcCyN@K2KpbNYQHd6PHzO0hBnyt24NPhtXNsA/D1NGSim5kuHsqV3kTtT2@U/Bm/Eb "R – Try It Online")
Checks for primes among the numbers formed by removing all combinations of digits from x.
The first combination is removal of *no* digits: this must be TRUE, and all other prime tests must be FALSE.
Commented:
```
is_delicate_prime=
function(x,                     # x = number to test
 n=nchar(x),                    # n = number of digits of x
 s=sum)                         # s = alias to sum() function
(a=                             # a = matrix of all prime-tests:
 apply(                         #     apply the function v to each of...
  !expand.grid(rep(list(0:1),n)),   # all combinations of n of TRUE/FALSE...
  1,                            #     row-by-row...
  function(v)                   #     defining the output of v as:
   (y=s((x%/%10^(n:1-1)%%10)    #       the digits of x...
    [v]                         #       (considering only the elements chosen by v)... 
       *10^(s(v):1-1)))         #       multiplied by 10^((v-1)..0)...
   &s(!y%%1:y)==2))             #       tested for primality AND non-zero
[1]                             # Finally, output TRUE if a[1] is TRUE...
   &!s(a[-1])                   # and the sum of all other elements of a are FALSE
```
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 54 bytes
```
Select[FromDigits/@Subsets@@RealDigits@#,PrimeQ]=={#}&
```
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n2b7Pzg1JzW5JNqtKD/XJTM9s6RY3yG4NKk4taTYwSEoNTEHIuigrBNQlJmbGhhra1utXKv2H8jLK4lW1rVLc1COVatzLCpKrKwzMuCCiEMNDUrMS091MDQAAp202Nj/AA "Wolfram Language (Mathematica) – Try It Online")
[Answer]
# JavaScript (ES6), ~~98~~ 95 bytes
Expects `n` as a string. Returns a Boolean value.
```
n=>[...n].reduce((a,x)=>[...a,...a.map(y=>(g=k=>y%--k?g(k):(p+=q=y>1&k<2,y))(y+=x))],[p=0])|q/p
```
[Try it online!](https://tio.run/##JchBDoIwEEDRq8xGmElLLS6VwYMQFg0UomBbQA1NvDti3Pz8vLt5m6WZb@GZOd/arePNcVkppVytZtu@Goto5Ep/NPIX9TABI5fY88BlPGTZcO1xoDMGwRPHMk@G4iQjEUbBK1Etq8C6ps90DFvnZ3TAkF/AQQG51no/IQi63QWkKUGSQOPd4kerRt@jo@0L "JavaScript (Node.js) – Try It Online")
### How?
We compute the powerset of the digits of `n` in such a way that the order is preserved and `n` itself is computed last. The result is true if the only prime among the resulting integers is the last one.
[Answer]
# [Python 2](https://docs.python.org/2/), ~~139~~ \$\cdots\$ ~~145~~ 142 bytes
Added 36 bytes to fix a bug kindly pointed out by [pxeger](https://codegolf.stackexchange.com/users/97857/pxeger).  
Saved 5 bytes thanks to [pxeger](https://codegolf.stackexchange.com/users/97857/pxeger)!!!
```
lambda n,R=range:all((g<2or any(g%i<1for i in R(2,g)))-(`g`==n)for g in{int(''.join(n[j]for j in R(len(n))if i>>j&1))for i in R(1,2**len(n))})
```
[Try it online!](https://tio.run/##rZBNb8IwDIbv/ApftsQoTG0ohSLCceeJa4dEoB9L1aVVmgua9ts7p@UwaddFsmM/rxM76e/@o7NyrNT72OrPa6HBipNy2tblXrct5/VBdg60vfP6yRziihIDxsKJS1Ej4opf6otSFoNSk/JlrOeMvTSdsdzmzTkIzXykLQkhmgrM8dg8x4i/7ouFXC4fFd84OsXZqzYtA8He9DAwXBQ9KMilgLWAjYCtgDgmywQktKdkuxBHwSXBZeR2O@JZFgqSlPI0C1IWRQFHU5xOnvh5EebxYR7@p812biWJStrXxNbbuXVCLKF48z9j4H4BtAZ6bcUH77hHnMitc668eeJ8GrLoEZSCYRJ7Rz8PXgCD1RGYgEGAyx9HzuMP "Python 2 – Try It Online")
Inputs an integer as a string and returns `True` if it's a delicate prime or `False` otherwise.
[Answer]
# [Python 3.8 (pre-release)](https://docs.python.org/3.8/), ~~146~~ 144 bytes
*-2 bytes by removing redundant parentheses*
I was also working on a very similar answer just before [Noodle9](https://codegolf.stackexchange.com/users/9481/noodle9) posted theirs, and I combined ideas from that to get this ([upvote it!](https://codegolf.stackexchange.com/a/211382)). That one is now quite different because they initially had a broken one, so I thought I'd post mine.
```
lambda s,R=range:(l:=len(s))*all((g!=int(s))^(g>1)&all(g%k for k in R(2,g))for g in{int(''.join(s[j]for j in R(l)if i>>j&1))for i in R(1,2**l)})
```
[Try it online!](https://tio.run/##jVHBboMwDL33K7zDmrjKJhJogErhI3ptO4muhUEzQIEdJsS3MweOuzSSnednx35Jut/hq23CpHNzYc6zzb@vtxx6cTQub8r7gduDsfeG94i73FrOyxdTNYOPP3iZSdx6tnx9QNE6eEDVwJErUSL6uKR49OWMvddtRW1O9cUn6rXQYlVAlWX1Vq4HqpWXQu12FiecneHs/KPi6JOBWJAMGW5uHRg4KQGhgL2AWICUZKmAiHZNlngceBd5l5JLEuLT1BdEmmKd@lQaBJ4OFqwXT/xl4@UMXg4PqLOAf8PidaCitKKMIhwSH1JJGK9CIuIjwvtnREmt9TPS8LABWj29QMH7wfEBcWE655@6YOMwwVsGYz/B6E58ucStQzAGrm1r6e8uE8P5Dw "Python 3.8 (pre-release) – Try It Online")
Explanation:
```
lambda s,R=range:(l:=len(s))*all((g!=int(s))^(g>1)&all(g%k for k in R(2,g))for g in{int(''.join(s[j]for j in R(l)if i>>j&1))for i in R(1,2**l)})
lambda s        :                                                                                                                                       function
        ,R=range                                                                                                                                        alias `range` built-in to `R`
                                                                                   {            s[j]for j in R(l)if i>>j&1  for i in R(1,2**l)}         compute the power-set (excluding the empty set)
                                                                                    int(''.join(                          ))                            convert each list of digits to an integer
                             all(                                          for g in                                                            )        check the integers for primality
                                                    all(g%k for k in R(2,g))                                                                            check for factors in the number
                                              (g>1)&                                                                                                    makes sure 0 and 1 aren't treated as prime
                                 (g!=int(s))^                                                                                                           ensure the number itself is prime
                 (l:=len(s))*                                                                                                                           store the length in `l`
```
[Answer]
# [SageMath](https://doc.sagemath.org/), 139 bytes
```
def f(n):s=str(n);l=len(s);return p(n)*all(~-p(g)for g in{int(''.join(s[j]for j in R(l)if i>>j&1))for i in R(1,2**l-1)})
R=range;p=is_prime
```
[Try it online!](https://sagecell.sagemath.org/?z=eJytkU1uwyAQhfc-xawKRKTyX-yQiBwi29SqIhtHWC5GQFaWe_YOpLtuizTD43ugGWBQI4zUsJOXPjgU51nOylDPzk6FpzNgEe7u80y_95Y-2Lg4eIA2qzaBEvI-LRp336YuGhMacKUz0yPoy2V6K1g6oF-84OVuN-8LtrHsKt3dPNTZSu0_rdNfKsucpOTjWbZ1T4AnVVSEZYMFCbeSQ8XhwKHlUBQYgkONc4NxjDqPqY5JYDoekQsRN9QNrhsRLZHnEedJNykj77LYZIhN0j9l2lepEmmJc4Wsal-la2Q16sP_tMFOGeDweFuzhBQjDSzBfnFO9QEtmvocLAMpwScTnw8_YyRr2GB_gdVvsLrb75FuI-wHUpV4AQ==&lang=sage&interacts=eJyLjgUAARUAuQ==)
Port of my Python answer.
[Answer]
# [Python 3](https://docs.python.org/3/),  181 bytes
**Using [itertools](https://docs.python.org/3/library/itertools.html) and a golfed recipe for `powerset`.**
```
lambda s,R=range:all(p(int(''.join(t)),R)for t in sum(([*combinations(s,k)]for k in R(1,len(s))),[]))>p(int(s),R)
from itertools import*
p=lambda n,R:any(n%i<1for i in R(2,n))or 2>n
```
[Try it online!](https://tio.run/##fVFfT8IwEH/fp7gXQwuN2RCQLc6PwMNekZiiLVa269JWE2P87PO6gQSMXnK3@//7Xdd@hBeLN50uH7paNttnCV5UpZO4U4Wsa9Yyg4GNRtev1iALnIuKa@sggEHwbw1j6/GTbbYGZTAWPfNizzexYx87KpaJWiHznCbXG87vh4U@7kna8oCJoiokfjC8MndZHDbD8FQg5xRO7zHRzjZggnLB2tqDaVrrwrhbQQl5Pk@TZ1WbJxmUp8R6KuBGwFzArYAsI80FzOi7IF1GP41mFk1OZrmkfJ7HhtmC4kUeS3maxnTa@4veUn6TRIIYCfbPRBeueJEAiZa1V4@t9SaYdyUOMaqdjDHxSkXaNxo9LPjhPMwfSzaAZj44RtefKlFa1/8O@Et6RDgiFjASgDz51XHiNCkh6@uK0mcs/mcwAB1P/Rvo2DEAHYZXb81WObAalHPW@QI@v4CRaoRJ9HXLR9f0zI0M7HzP5Jz/5RuLC1jOu28)
Expects input as a string.
The function `p` returns `True` if its input is not prime, and `False` if it is prime; the main function returns `(forall t, p(t)) > p(s)` where `t` takes all the "subvalues" of `s`. The only way for booleans to satisfy this inequality is `True > False`, which means all `t` are nonprimes and `s` is not nonprime.
*Disclaimer: There were already two python answers when I posted this one.*
]