[Question]
  [
As we all know, [it's turtles all the way down](https://en.wikipedia.org/wiki/Turtles_all_the_way_down). But is it primes all the way down too?
A number is considered a "turtle-prime" if it satisfies the following conditions:
```
1) It is prime.
2) It is possible to remove a single digit leaving a prime number.
3) Step 2 can be repeated until left with a single digit prime.
```
For example, `239` is a "turtle-prime", as it can be reduced to `23` then either `2` or `3`, both of which are prime. It also can be reduced to `29` then `2`. `151` is not a turtle prime, as it reduces to `15` (not prime), `51` (not prime), or `11`. `11` is prime, but can only reduce to `1`, which is not. 
Given a positive integer, determine if it is a "turtle-prime". Your output can be in any form so long as it gives the same output for any truthy or falsey value.
Test cases:
```
input -> output
1     -> false
2     -> true
17    -> true
19    -> false
239   -> true
389   -> false
```
# Scoring
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the shortest answer in each language wins!
  
[Answer]
# [Haskell](https://www.haskell.org/), ~~104~~ ~~102~~ ~~99~~ ~~98~~ ~~97~~ ~~95~~ 91 bytes
```
p x=product[2..x-1]^2`mod`x>0
f[]=1>0
f x|y<-zip[0..]x=or[f[snd b|b<-y,b/=a]|a<-y,p$read x]
```
[Try it online!](https://tio.run/##FcxBDoMgEEDRfU9BjMuCYtKd9CKTaYQiKakCQZuMDXendfXf6r/09p6XpdbESKUc7ee5wyAEcYmPYVqjnejeXxygkmcZlWPkX5@gFwJJxQwOtmCZKWbkx9V0SmPRJ1ObZ20ZYV21D/@5D3vrGnmTTf0B "Haskell – Try It Online")
## Explanation
First we set up a primality test
```
p x=product[2..x-1]^2`mod`x>0
```
This uses [Wilson's Theorem](https://en.wikipedia.org/wiki/Wilson%27s_theorem) to determine the primality of an input.
We then declare a base case, which will assert that the empty string is truthy.
```
f[]=1>0
```
Now we define the actual function
```
f x|y<-zip[0..]x=or[f[snd b|b<-y,b/=a]|a<-y,p$read x]
```
We use a pattern guard to bind `zip[0..]x` to `y`, because we need to use it twice later. We then assert the answer is
```
or[f[snd b|b<-y,b/=a]|a<-y,p$read x]
```
`[[snd b|b<-y,b/=a]|a<-y]` is all of the numbers that are a digit removed from our input. So we are asserting that at least one of these numbers is truthy for `f`. In order to ensure that composite numbers are falsy we add in `prime$read x`. If the number is not prime the list will become empty and the `any` of a empty list is false.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 16 bytes
```
DŒPḊṖLÐṀḌß€¬Ȧ<ÆP
```
[Try it online!](https://tio.run/##y0rNyan8/9/l6KSAhzu6Hu6c5nN4wsOdDQ939Bye/6hpzaE1J5bZHG4L@H90z@F2IN/9/39DHQUjHQVDcyC2BDKNgYSxhSUA "Jelly – Try It Online")
### How it works
```
DŒPḊṖLÐṀḌß€¬Ȧ<ÆP  Main link. Argument: n
D                 Decimal; convert n to base 10.
 ŒP               Powerset; get all sub-arrays of n's decimal digits.
   Ḋ              Dequeue; remove the first sub-array (empty array).
    Ṗ             Pop; remove the last sub-array (all of n's digits).
     LÐṀ          Maximal by length; keep those of the remaining subarrays that
                  have maximal length. This keep exactly those sub-arrays that have
                  one (and only one) digit removed. If n < 10, this yields an empty
                  array. Without Ḋ, it would yield [[]] instead.
        Ḍ         Undecimal; turn the generated digit arrays into integers.
         ß€       Recursively map the main link over the generated integers.
           ¬      Negate; map 1 to 0 and 0 to 1.
            Ȧ     Any and all; yield 0 if the array is empty (n < 10) or any of the
                  recursive calls returned 1 (mapped to 0). If all calls returned
                  0, this will yield 1.
              ÆP  Test n for primality, yielding 1 for primes, 0 otherwise.
             <    Test if the result to the left is less than the result to the
                  right. This is possible only if the left result is 0 (n < 10 or
                  removing a digit results in a turtle prime) and the right result
                  is 1 (n itself is prime).
```
[Answer]
# R, ~~124~~ ~~122~~ ~~120~~ ~~113~~ ~~95~~ ~~93~~ ~~106~~ 105 bytes
```
 g=pryr::f(`if`(gmp::isprime(sum(x*10^((l<-sum(x|1)-1):0))),any(!l,sapply(0:l+1,function(z)g(x[-z]))),!1))
```
Which evaluates to the function:
```
function (x) 
if (gmp::isprime(sum(x * 10^((l <- sum(x | 1) - 1):0)))) any(!l, 
    sapply(0:l + 1, function(z) g(x[-z]))) else !1
```
Recursive solution. Takes input as a list of digits.
Has 2 logical statements:
1. Is `x` prime when concatenated?
2. Is any of the following `TRUE`:
	1. Is the length of `x` nonzero? This is our final terminating condition.
	2. Is `f` `TRUE` for any subset of `x`?
The first statement ensures we keep working with primes only. The second does the actual recursion.
Saved two bytes thanks to @Giuseppe.
I had to revert some of my golfs because of a bug, where I was testing with a previous function definition by accident.
# R, 98 bytes, non-competing
Like I mentioned in the comments, I made a [package](https://github.com/JarkoDubbeldam/RG). Since the challenge predates that, this is non-competing, but I wanted to showcase it a bit. It's not much so far, but we'll get there.
```
g=pryr::f(`if`(gmp::isprime(RG::C(x)),any(!(l<-sum(x|1)-1),sapply(0:l+1,function(z)g(x[-z]))),!1))
```
`C()` is the first function in the package, and takes care of concatenating digits into a numeric. 
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 19 bytes
```
DJḟÐ€`ịDḌḟ0ß€¬Ȧ¬aÆP
```
[Try it online!](https://tio.run/##y0rNyan8/9/F6@GO@YcnPGpak/Bwd7fLwx09QL7B4flAgUNrTiw7tCbxcFvA/8PtQP7//4Y6RjqG5jqGljpGxpY6xhaWAA "Jelly – Try It Online")
## How it works
```
DJḟÐ€`ịDḌḟ0ß€¬Ȧ¬aÆP                input:239
D                    decimal         [2,3,9]
 J                   range@length    [1,2,3]
  ḟÐ€`               filter out each [[2,3],[1,3],[1,2]]
      ịD             index&decimal   [[3,9],[2,9],[2,3]]
        Ḍ            undecimal       [39,29,23]
         ḟ0          filter out 0    [39,29,23]
           ß€        this@each       [1,1,1]
             ¬       logical not     [0,0,0]
              Ȧ      any and all     0
               ¬     logical not     1
                aÆP  and&is_prime    1
```
Recursion without base case ftw.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~27~~ 26 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
DµœcL’$Ḍµ€FÆPÐf
×⁵WÇÐĿFṪ<8
```
A monadic link taking and returning integers (`1` for turtle `0` otherwise).
**[Try it online!](https://tio.run/##AToAxf9qZWxsef//RMK1xZNjTOKAmSThuIzCteKCrEbDhlDDkGYKw5figbVXw4fDkMS/RuG5qjw4////MjM5 "Jelly – Try It Online")**
### How?
```
DµœcL’$Ḍµ€FÆPÐf  Link 1: primes by digit removal: list of numbers  e.g. [19790]
D                cast to decimal list (vectorises)                      [[1,9,7,9,0]]
 µ      µ€       monadic chain for €ach:
      $            last two links as a monad:
    L                length                                             5
     ’               decrement                                          4
  œc             combinations without replacement                       [[1,9,7,9],[1,9,7,0],[1,9,9,0],[1,7,9,0],[9,7,9,0]]
       Ḍ         cast from decimal list (vectorises)                    [1979,1970,1990,1790,9790]
          F      flatten (from a list of lists form the for €ach to a single list)
             Ðf  filter keep if:
           ÆP      is prime?
×⁵WÇÐĿFṪ<8  Main Link: number, n             e.g. 1979
 ⁵          literal 10
×           multiply                              19790
              (this is so the first number is tested as prime too)
  W         wrap in a list                        [19790]
    ÐĿ      loop, collecting results (including the input×10) while change still occurs:
   Ç          call the last (1) link as a monad   [[19790],[1979],[197,199,179],[19,17,97,19,19,17,19,79],[7,7,7,7],[]]
      F     flatten                               [19790,1979,197,199,179,19,17,97,19,19,17,19,79,7,7,7,7]
       Ṫ    tail                                  7
        <8  less than 8?                          1
              (if a single digit prime was reached this will be 1
               otherwise it will be 0
               e.g. an input of 4 yields 40 at the end which is not <8)
```
[Answer]
# [Ruby](https://www.ruby-lang.org/), ~~72~~ 57+8 = ~~80~~ 65 bytes
Uses the `-rprime` flag. -15 bytes from histocrat!
```
f=->n{n==''||n.to_i.prime?&!n.scan(/./){f[$`+$']&&break}}
```
[Try it online!](https://tio.run/##Hc3dCoIwGIDh8@8qpg4twsmSKAPrQkKW2cxRbmObRKi33vo5e08eXjNcXt63ZXqQoyzLJJkmSZxigmgjen6MA0lsU8tFRrLl2J7weYWTKo4vhtf3efbPTjw4unFnAWFGmk71OgCkB2dRGGG2R9FPsWoOgcurp7AGugVaAN18Oy8g3xVvpZ1Q0vrU/K8f "Ruby – Try It Online")
[Answer]
# Java, 220 bytes
[Try it online!](https://tio.run/##XZDBbsIwDIbvPIU1aVKilqiww8YKlbbDJG6T2G3aIUDKzEJaJS4DoT47c1u6oUWyYyX2Z/vf6r0eFqVx2/XXeWV1CDAPc3p6qzxZ8@pxZ@A0GACU1dLiCgJp4mtf4Bp2Gp1YkEe3ef8A7TdBci7wyQsPAh0BwiM48w0cc8oJRjGMYxjds004vGN39zCBui8EWBwDmZ0qKlIlk8k6gRDBDQwzdlFL@z@hkIrE3JHZGK@o6EYSKKVMW2o9aKxZwuNek@m3WBaFNdpBLrYsg6oIrcortyIsnGLeyyWePneJGeRxswq4fl5vqPIMULos7VG4tmF97sF0kYcLTk2dnTlljdvQp5Ap5iIXh2F2YrU6sWbjFKeHVPLP4RajaDZL5KXDaJqkl/CQjdI6bnXoVua2sqmx0/FvepakxgYDf@yE2bZlk3AqVMvQyZTEKKPrhyjC2DLxCnU1RH2uzz8)
Golfed:
```
boolean t(String n){int l=n.length();if(f(x->{for(int i=2;i<x;)if(x%i++==0)return 1<0;return x>1;},new Integer(n)))if(l<2)return 1>0;else for(int i=0;i<l;)if(t(n.substring(0,i)+n.substring(++i,l)))return 1>0;return 1<0;}
```
Ungolfed:
```
  boolean t(String n) {
    int l = n.length();
    if (f(x -> {
      for (int i = 2; i < x;) {
        if (x % i++ == 0) {
          return 1 < 0;
        }
      }
      return x > 1;
    } , new Integer(n))) {
      if (l < 2) {
        return 1 > 0;
      }
      else {
        for (int i = 0; i < l;) {
          if (t(n.substring(0, i) + n.substring(++i, l))) {
            return 1 > 0;
          }
        }
      }
    }
    return 1 < 0;
  }
```
[Answer]
# [Python 2](https://docs.python.org/2/), ~~132~~ ~~124~~ 119 bytes
-8 Thanks to @WheatWizard
-5 Thanks to @LeakyNun
```
p=lambda i:i>1and all(i%v for v in range(2,i))
f=lambda n:n<'0'or any(f(n[:i]+n[i+1:])for i in range(len(n)))*p(int(n))
```
[Try it online!](https://tio.run/##RY3BDoIwDIbP9Cl2MWziwYJGWMSn8EY4zADSZJZlAoanx3Ewnvo3//e1bhn7gdN1daU1r0djBGm6oeFGGGsl7WbRDV7Mglh4w89WpgdSCrofzpqv8TEOjOFFdpIrTXXCFSWoa7W59Hdty5KVUnsnicctrp@ebCvufmo1RFy@Rx8qN40yPImcD5gIR9WaZgUgIiCEmSOctv2MkAJeIMuLLw "Python 2 – Try It Online")
Can't think of anything to hone it down without some builtin prime checker. Takes the number as a string (I assumed this given the OP allowed a list of digits, but if not then +14 bytes for another lambda), and recursively computes each "turtled" number's turtleness.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~28~~ 27 bytes
Iterative solution.
```
¸[D0èg2‹#εæ¨D€gZQÏDpÏ}˜]p1å
```
[Try it online!](https://tio.run/##ATUAyv8wNWFiMWX//8K4W0Qww6hnMuKAuSPOtcOmwqhE4oKsZ1pRw49EcMOPfcucXXAxw6X//zIzOQ "05AB1E – Try It Online")
**Explanation**
```
¸                              # wrap input in a list
 [                             # start a loop
  D0èg2‹#                      # if the length of the first element is less than 2, break
         ε                     # apply to each element in the list
          æ                    # compute powerset
           ¨                   # remove last element (the full number)
            D€gZQÏ             # keep only the elements whose length is the max length
                  DpÏ          # keep only primes
                     }         # end apply
                      ˜        # flatten list
                       ]       # end loop
                        p1å    # is any element in the resulting list prime
```
[Answer]
# C#, 355 bytes
```
namespace System{using B=Numerics.BigInteger;class A{static void Main(){Console.WriteLine(D(Console.ReadLine()));}static bool P(B x){if(x<2)return 1<0;B r=1;for(int i=1;i<=x-1;i++)r*=i;return(r+1)%x==0;}static bool D(string x){if(x.Length==0)return 1>0;bool b;if(b=P(B.Parse(x))){var n=1<0;for(int i=0;i<x.Length;i++)n|=D(x.Remove(i,1));b&=n;}return b;}}}
```
[Try it online!](https://tio.run/##VY9BT4QwEIX/Si@a1nUJ7MHElJqIXExWs1kPngs7i5NAa6aFYJDfjl1k3XiayeTNe98r3bq0BNNkdAPuU5fA3r6ch2ZoHZqKZeq1bYCwdFGG1bPxUAHJstbOscfBee2xZJ3FA3vRaLgYnqxxtobondDDFg3wnJ9ve9CH@SSEkOPyXFhbsx3PWC8GPPI@3QgC35JhSRrLjJFK5NESR@MZhh1T1a/DWK0E3SiUv2JOq0Rc9UrF/41z7jydiizu0RZM5T@C7i/lIZaztJBBUKiAEu00OeB9wBw6TcyoE8oFIg4QZ6cZxHyrPHjvobEdcLxNQr/iWhk5LiGFHMdxmjZ39z8 "Try It Online")
My first code golf, so I hope I did it alright. I couldn't think of a way to make it even smaller (other than using int instead of BigInteger, but I did it so it would work for all provided test cases). Anyway, here's the same properly formatted:
```
namespace System
{
    using B = Numerics.BigInteger;
    class A
    {
        static void Main()
        {
            Console.WriteLine(D(Console.ReadLine()));
        }
        static bool P(B x)
        {
            if (x < 2)
                return 1<0;
            B r = 1;
            for (int i = 1; i <= x - 1; i++)
                r *= i;
            return (r + 1) % x == 0;
        }
        static bool D(string x)
        {
            if (x.Length == 0)
                return 1>0;
            bool b;
            if (b = P(B.Parse(x)))
            {
                var n = 1<0;
                for (int i = 0; i < x.Length; i++)
                    n |= D(x.Remove(i, 1));
                b &= n;
            }
            return b;
        }
    }
}
```
[Answer]
# [Perl 6](http://perl6.org/), 65 bytes
```
my&f={.is-prime&&(10>$_||?grep {f +[~] .list},m:ex/^(.*).(.*)$/)}
```
[Try it online!](https://tio.run/##FcrdCsIgAAbQV/kYItqPyw0qt1oPEiVd6BAmiXbR2NarW92cqxNMHPY5@5Ha8yRc2obovKGUyV1H9Dxf@mgCJov19XODGFx6LRvfmHd5Z2LFxR9S8iW3SI8RBdHNbzOi@VLAPiNOEhXkAVKhqhXqo@ra/AU "Perl 6 – Try It Online")
[Answer]
# [PHP](https://php.net/), 164 bytes
```
function t($n){for($i=1;++$i<$n;)if($n%$i<1)return 0;if($n<10)return $n>1;foreach($r=str_split($n)as$k=>$v){$q=$r;array_splice($q,$k,1);$z|=t(join($q));}return $z;}
```
[Try it online!](https://tio.run/##dY/BTsMwDIbvfQqrMlKi7bCwA5QsnTjwBtwomqIupaFTmrnpBBt79pJ2DE7k5Pz/78@2r/2wWvvaJ4aopQ0Z31Kw7o0JLoeqd2WwrYPA0PFT1RJDq4SczdCu0Eluq2jcxI/gZEJPDhZy0lZicVXQ5ULGVqPLmiGpLtCm8zs7MXWHjcrxwE@4V0hSE@nPyS4Nw/0cm3lcBI9fKrD31rqocS7PV/RRngcMpgug4EWovNK7zszhVuWB@liIu98q@3OX2VVd3megcpiMV5n8bAnswtQdYDP6cT84JRAfmjiJ4QHWkI6IFB4gndpTLi8JPSbicQ3/P2TKuoX0eRyCTeGePrwpg9lGfOEey9DrXeQUrnCpTM7DNw "PHP – Try It Online")
Starts off by testing the number for primality, then loops through the digits as an array, popping each one out and joining the rest back together and feeding them recursively through the function again. Each link downwards does a logical OR with the lower paths, only returning `true` if there exists at least one path of all primes.
[Answer]
# Javascript 167 bytes
```
n=>{a=[];for(i=1;i++<=n;)a.every(x=>i%x)?a.push(i):0;b=k=>(s=''+k,a.indexOf(k)>-1&&(k<10||[...s].some((x,i)=>(r=[...s],r.splice(i,1),b(~~(r.join('')))))));return b(n)}
```
## Explanation
```
n=>{
    a=[];                             // create array to store primes in
    for(i=1;i++<=n;)                  // iterate from 2 to n
        a.every(x=>i%x)?a.push(i):0;  // if i % x is truthy for all x in a,
                                      // then i is prime
    b=k=>(                            // function to test is k is turtle prime
        s=''+k,                       // convert k to a string
        a.indexOf(k)>-1 && (          // if k is prime and
            k<10 ||                   // k is a single digit or
            [...s].some((x,i)=>(      // iterate over the digits of k
                                      // and check to see if, by removing each
                                      // any of the resulting numbers is turtle prime
                                      // ... is spread operator
                                      // [...s] converts string s to an array of characters 
                r=[...s],             // convert s to an array again,
                                      // importantly, this cannot be the same array
                                      // we created above, as we need to
                r.splice(i,1),        // splice out the ith element of the array
                b(~~(r.join('')))     // join the array to a string, convert to int,
                                      // and check if this number is turtle prime
                                      // ~ is bitwise negate, implicitly converts to int first before negating
                                      // ~~ negates the negation, getting us the int
            ))
        )
    );
    return b(n)
}
```
```
F=n=>{a=[];for(i=1;i++<=n;)a.every(x=>i%x)?a.push(i):0;b=k=>(s=''+k,a.indexOf(k)>-1&&(k<10||[...s].some((x,i)=>(r=[...s],r.splice(i,1),b(~~(r.join('')))))));return b(n)}
$('#input').on('keyup', () => $('#output').text(F(parseInt($('#input').val(), 10))))
```
```
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="text" id="input" />
<span id="output"></span>
```
]