[Question]
  [
### Description
Chicken McNugget numbers are numbers that can be expressed as a sum of \$6\$, \$9\$ or \$20\$ - the initial sizes of the famous [Chicken McNuggets](https://en.wikipedia.org/wiki/Chicken_McNuggets) boxes sold by McDonald's. In that sum, a number may occur more than once, so \$6 + 6 = 12\$ is such a number too, and the number must "contain" at least one of the mentioned sizes. The first Chicken McNugget numbers are:
\begin{align\*}&6\\
 &9\\
 &6 + 6 = 12\\
 &6 + 9 = 15\\
 &9 + 9 = 6 + 6 + 6 = 18\\
 &20\\
 &6 + 6 + 9 = 21\\
 &\dots
\end{align\*}
### Challenge
Your task is to write a program or function, that, given a positive integer, determines whether this number can be expressed in the described way, therefore is such a Chicken McNugget number. It should then output a truthy or falsy value based on its decision.
### Test cases
```
6 -> true
7 -> false
12 -> true
15 -> true
21 -> true
40 -> true
42 -> true
```
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the shortest answer in bytes wins and the standard loopholes apply!
  
[Answer]
# Python, 27 bytes
```
lambda n:0x82492cb6dbf>>n&1
```
[Try it online!](https://tio.run/##BcFBDkAwEAXQq8xK2l1bIki4CBYthiZ8TWPB6cd76XuOG6VwP8npr7B6QmfexlWtW0K9Bh4GFFZSjnjUCOI7EyiCsse@KWuMpsjECnrW8gM "Python 3 – Try It Online")
[Answer]
# [Python 3](https://docs.python.org/3/), 24 bytes
```
lambda n:0<=n--n%3*20!=3
```
[Try it online!](https://tio.run/##K6gsycjPM/6fZhvzPycxNyklUSHPysDGNk9XN0/VWMvIQNEWKJlfpJCnkJmnUJSYl56qYahjaGCgacWlkJmmkZdfogAkNTWtCooy80qArP8A "Python 3 – Try It Online")
## Explanation
With `6` and `9` alone, one can make all integers divisible by `3` which are greater than `3`, as is stated in [ovs's comment to the challenge](https://codegolf.stackexchange.com/questions/132702/chicken-mcnugget-numbers#comment325678_132702). It is assumed that one can also make `0`. In conclusion, one can make `0,6,9,12,15,...`.
With one instance of `20`, one can make: `20,26,29,32,35,...`.
With two instances of `20`, one can make: `40,46,49,52,55,...`.
Three instances is never necessary, for `3 x 20 = 10 x 6`.
---
Notice that the cases where no `20` is needed is also divisible by 3; the cases where one `20` is needed leaves a remainder of `2`; the cases where two `20` is needed leaves a remainder of `1`.
The number of `20` needed can hence be calculated by `(-n)%3`. Then, we do `n-(((-n)%3)*20)` to remove the number of `20` needed from the number. We then check that this number is non-negative, but is not `3`.
[Answer]
# [Python 2](https://docs.python.org/2/), 28 bytes
```
lambda n:-n%3-n/20<(n%20!=3)
```
[Try it online!](https://tio.run/##NdDLTsMwEIXhfZ7CLColUiocX2bsCj8JsAgiKZWKqaxs@vThrxCLsxifb7yY2337@qluX8vbfp2/Pz5nU0/HevDH@uzsS18Pzj4VP@zb3M7LZop5ldHk0UyORJJG4yyZSCDUTgnG8@5x3hOsp/N4TxfoAjuBPrAX6AN9YDdgAiZiIiZiIn9EXMRFXMRFXMQJTnCCE5zgBCc4wQlOcIpTnOIUpzjFKU5xilNcwiVcwiVcwiVcwiVcwiVcxmVcxmVcxmVcfpwIl3H5cStr37uulfVy3ZbWr2Ob63npp3Gy0zB0t3apm2ml/N34f95/AQ "Python 2 – Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 11 bytes
```
ṗ3’æ.“©µÞ‘ċ
```
[Try it online!](https://tio.run/##ASoA1f9qZWxsef//4bmXM@KAmcOmLuKAnMKpwrXDnuKAmMSL/zByNDDDh8OQZv8 "Jelly – Try It Online")
### How it works
```
ṗ3’æ.“©µÞ‘ċ  Main link. Argument: n
ṗ3           Cartesian power; yield all 3-tuples over [1, ..., n].
  ’          Decrement all coordinates.
     “©µÞ‘   Yield [6, 9, 20].
   æ.        Take the dot product of each 3-tuple and [6, 9, 20].
          ċ  Count the occurrences of n (Positive for Chicken McNuggets numbers).
```
[Answer]
# [Haskell](https://www.haskell.org/), 36 bytes
```
f n|n<1=n==0
f n=any(f.(n-))[6,9,20]
```
[Try it online!](https://tio.run/##DcoxDsIwDIXhvafwwJBIBsVJKVSqT1J1yEBERGtVwILE3dM3vMH@v2f@vB7r2loh@9skaqqhw6HZfq5cnJ29nwceOYalVZ2FKTIlpp7pynRjujNJwFAEf0GQAUOSERo84h@hI2yCSzAJvU9Lt@Vqur@rfU9uyzsVqr4d "Haskell – Try It Online")
## Explanation
This solution is about as straightforward as it can get. The first line declares that for any number less than 1 it is a McNugget number if `n==0`. That is to say that `0` is a McNugget number and all negative numbers are not.
The second line declares that for all other numbers, `n` is a McNugget number if it minus any of the Nugget sizes is a McNugget number.
This is a pretty simple recursive search.
[Answer]
# [Python 3](https://docs.python.org/3/), 48 46 42 bytes
```
lambda n:n+50in b'2345679:<=?@BCEHIKNQTW]'
```
[Try it online!](https://tio.run/##K6gsycjPM/6fZhvzPycxNyklUSHPKk/b1CAzTyFJ3cjYxNTM3NLKxtbewcnZ1cPT2y8wJDxW/X9BUWZeiYZSTJ6SXlZ@Zp5GcUmRRp6mgraCkoKuHZDQVgCJpAHFNBXS8osU8hSA5hUl5qWnapgaaGpq/gcA "Python 3 – Try It Online")
Switches `True` and `False`.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 11 bytes
```
_20$%3$¿o>3
```
[Try it online!](https://tio.run/##y0rNyan8/z/eyEBF1Vjl0P58O@P/hgYGQYfbD094uGP@fwA "Jelly – Try It Online")
Port of [my Python answer](https://codegolf.stackexchange.com/a/132708/48934), but slightly modified: subtract `20` until divisible by `3`, then check whether it belongs to `0,6,9,...` by mapping `0` to the input (by using `or`), and then check if it is greater than `3`.
The only three numbers that produce `0` upon completing the first step is `0`, `20`, or `40`, with the first one being out of the domain, and the rest being greater than `3`.
[Answer]
# Mathematica, 53 bytes
```
!Flatten@Table[Tr/@Tuples[{6,9,20},i],{i,#}]~FreeQ~#&
```
[Answer]
# Mathematica, 30 bytes
```
{6,9,20}~FrobeniusSolve~#!={}&
```
[Try it on Wolfram Sandbox.](http://sandbox.open.wolframcloud.com/)
[Answer]
# Mathematica, 20 bytes
```
0<=#-20Mod[-#,3]!=3&
```
Anonymous function. Takes a number as input and returns `True` or `False` as output. Logic copied from [Leaky Nun's answer](https://codegolf.stackexchange.com/a/132708), with some added abuse of `Inequality`.
[Answer]
# x86-64 Machine Code, 22 bytes
```
48 B8 41 92 34 6D DB F7 FF FF 83 F9 40 7D 03 48 D3 E8 83 E0 01 C3
```
The above bytes define a function in 64-bit x86 machine code that determines whether the input value is a Chicken McNugget number. The single positive integer parameter is passed in the `ECX` register, following the [Microsoft 64-bit calling convention](https://en.wikipedia.org/wiki/X86_calling_conventions#Microsoft_x64_calling_convention) used on Windows. The result is a Boolean value returned in the `EAX` register.
**Ungolfed assembly mnemonics:**
```
; bool IsMcNuggetNumber(int n)
; n is passed in ECX
    movabs  rax, 0xFFFFF7DB6D349241   ; load a 64-bit constant (the bit field)
    cmp     ecx, 64
    jge     TheEnd                    ; if input value >= 64, branch to end
    shr     rax, cl
TheEnd:
    and     eax, 1                    ; mask off all but LSB
    ret
```
Obviously, this plays heavily off of [Anders Kaseorg's solution in Python](https://codegolf.stackexchange.com/a/132717/58518), in that it is based around a bit-field representing the values that are Chicken McNugget numbers. Specifically, each bit in this field that corresponds to a valid Chicken McNugget number is set to 1; all other bits are set to 0. (This considers 0 to be a valid Chicken McNugget number, but if you don't like that, your preference is a single-bit modification away.)
We start off by simply loading this value into a register. It is a 64-bit value, which already takes 8 bytes to encode, plus we need a one-byte REX.W prefix, so we are really being quite spendthrift in terms of bytes, but this is the heart of the solution, so I guess it's worth it.
We then shift the field right by the input value.\* Finally, we mask off all but the lowest-order bit, and that becomes our Boolean result.
However, since you cannot shift by more than the number of bits actually in the value, this works only for inputs from 0–63. To support higher input values, we insert a test at the top of the function that branches to the bottom of the input value is >= 64. The only thing interesting about this is the we *preload* the bit-field constant in `RAX`, and then branch down to the instruction that masks off the lowest-order bit, thus ensuring that we always return 1.
**[Try it online!](https://tio.run/##LY9Rb4IwFIWfub/ihsWkRVxwEMXgfED0T9iF1ILaRGApdWmy@NfHruLDyUnznZ6eqtlZqWFQXdtbVBdp0KWLbVfVhy/8RF@4JBUuJyVz4VYfwsWJcItCuCIXbr8k7UelMfmKcpFwS@JRPN4tyHfpyHfEIurZxn4GvZVWKyzzrrtiWUprjT7ebF2WjDV9KY@ac2QBzdm7ljPdWk6LXusyAHjTrbreqhrXva10937ZAFAKG6nbRxylOavw@akgeBx@OPyCd@oMPrGmuigjW@M8mmc4nWoOHiW8b0P8xPzxbTbRXNjZBidaWGH9EHWIL0QbM/Du4IFnanszLTXCfRj@1Okqz/0waxbJPw "C (gcc) – Try It Online")**  
(The C function call there is annotated with an attribute that causes GCC to call it using the Microsoft calling convention that my assembly code uses. If TIO had provided MSVC, this wouldn't be necessary.)
\_\_  
\* As an alternative to a shift, we could have used the x86 `BT` instruction, but that's 1 byte longer to encode, so no advantage. Unless we were *forced* to use a different calling convention that didn't conveniently pass the input value in the `ECX` register. This would be a problem because `SHR` *requires* that its source operand be `CL` for a dynamic shift count. Therefore, a different calling convention would require that we `MOV`ed the input value from whatever register it was passed in to `ECX`, which would cost us 2 bytes. The `BT` instruction can use *any* register as a source operand, at a cost of only 1 byte. So, in that situation, it would be preferable. `BT` puts the value of the corresponding bit into the carry flag (CF), so you would use a `SETC` instruction to get that value in an integer register like `AL` so it could be returned to the caller.
---
**Alternative implementation, 23 bytes**
Here is an alternative implementation that uses modulo and multiplication operations to determine whether the input value is a Chicken McNugget number.
It uses the [System V AMD64 calling convention](https://en.wikipedia.org/wiki/X86_calling_conventions#System_V_AMD64_ABI), which passes the input value in the `EDI` register. The result is still a Boolean, returned in `EAX`.
Note, though, that unlike the above code, this is an *inverse* Boolean (for implementation convenience). It returns `false` if the input value is a Chicken McNugget number, or `true` if the input value is *not* a Chicken McNugget number.
```
                    ; bool IsNotMcNuggetNumber(int n)
                    ; n is passed in EDI
8D 04 3F            lea    eax, [rdi+rdi*1]   ; multiply input by 2, and put result in EAX
83 FF 2B            cmp    edi, 43
7D 0E               jge    TheEnd             ; everything >= 43 is a McNugget number
99                  cdq                       ; zero EDX in only 1 byte
6A 03               push   3
59                  pop    rcx                ; short way to put 3 in ECX for DIV
F7 F1               div    ecx                ; divide input value by 3
6B D2 14            imul   edx, edx, 20       ; multiply remainder of division by 20
39 D7               cmp    edi, edx
0F 9C C0            setl   al                 ; AL = (original input) < (input % 3 * 20)
                 TheEnd:
C3                  ret
```
What's ugly about this is the need to explicitly handle input values >= 43 by a compare-and-branch at the top. There are obviously other ways of doing this that don't require branching, like [caird coinheringaahing's algorithm](https://codegolf.stackexchange.com/a/132767/58518), but this would take a *lot* more bytes to encode, so isn't a reasonable solution. I figure I'm probably missing some bit-twiddling trick that would make this work out more elegantly and be fewer bytes than the bitfield-based solution above (since encoding the bitfield itself takes so many bytes), but I've studied this for a while and still can't see it.
Oh well, [try it online](https://tio.run/##LU/tbsIwDPxdP4XphNRAGS1lfKgMaZT1JZZpKiGUSG06pQFFmnj1dS7jh@XL3dkXi0kpRNeJRrcWxbkw6FaLrDnKj098RZ@71Z67aM5dkhNOuMupz3bcLXv@nbv1mrvFG2HSXgjnS6qYOPLsZ9zF/Szxe@Ijml1n3GURVeKn0NrCKoFfu6apMBhRdO40C5S2jNIfP0kB4ElpUV2OEjetParm@bwFIBfWhdK9HQtTivB@wGjUP64MfsA7NQbvsqJ1UUptg3EUpzgeKwYeObxvQ/op8P@zg6Fi3E62OFTccuuHqEIcPDTFWIo4naKRtawP0pCqr9K0Eg90gCw0Ke2lsgPwbuCBZ6S9GE3BcOu6X3GqirLtJvVi/gc "C (gcc) – Try It Online") anyway!
[Answer]
# 05AB1E, 17 16 bytes
```
ŽGç₂в©IED®âO«]I¢
```
[Try it online!](https://tio.run/##ASUA2v9vc2FiaWX//8W9R8On4oKC0LLCqUlFRMKuw6JPwqtdScKi//85 "05AB1E – Try It Online")
Explanation
```
  ŽGç₂в                 The list [6, 9, 20]
       ©                Store this list in register_c
        IE              Loop <input> number of times
           ®â           Cartesian product stack contents with list in register_c
             O          Sum up the contents of each sub array
          D   «         List duplicated before taking Cartesian product, concat
               ]        End for loop
                I¢      Count occurences of input
```
[Answer]
# JavaScript (ES6), ~~69~~ 64 bytes
```
n=>'ABCDEFHIKLNOQRTWXZ]`cfl'.includes(String.fromCharCode(n+65))
```
```
f=
n=>'ABCDEFHIKLNOQRTWXZ]`cfl'.includes(String.fromCharCode(n+65))
```
```
<input onkeydown=a.innerHTML=f(this.value)>
<pre id=a>
```
Outputs `false` for Chicken McNugget numbers, `true` otherwise.
[Answer]
# Java, ~~21~~ ~~57~~ 24 bytes
**[Try it online!](https://tio.run/##ZZFfa9swFMXf/SlOCxtOopjETveH1IZstGyQ9cVsL2MMxZFdpc61ka7ThZLPnl1nCRvsQUic@9O590gbvdPjpjW0WT8d7bZtHGMjWtSxraPhPAiKWnuPj4@2eDL0pXjoqsrwQ7ddGefxEgRA6@xOs4FnzbZAaUnXyA3ffiY2lXEZ7hfL/O7nt8Xy612OFGSe8Un7x57JwoVzeu8j7ZfWcyh@OAHny99/4AUThalCrJAozBRuFN4qvBOxL0hlKvpUCtM3sqQ0fS@04LHosdCxsIlwiTCJ1GcJDoPB/DR8t6pl6PPsu8ausdWWwpydpUq6a1f5gQTt5yobh9ASw0qKyVy2W8xu5hiN7AUB8r1ns42ajiN5GeKaQosRrjHOYH61pmCzTq9Fufr3WaKiIZbGPhQroRV0wZ2uT2QZHmmchTROaRi/SobxZJClk9d0lSZHBdtH6Tsfgn79F2rVNLXRJC5/f7bsqGDbUHR/Plw@S@HDHzxDKdaSlS7RnOHOiU2k27beh3TqeggOx98)**
Golfed:
```
n->(n-=n*2%3*20)>=0&n!=3
```
Ungolfed:
```
import java.util.*;
public class ChickenMcNuggetNumbers {
  private static final Set<Integer> FALSE_VALUES = new HashSet<>(Arrays.asList(
    new Integer[] { 0, 1, 2, 3, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 22, 23,
    25, 28, 31, 34, 37, 43 }));
  public static void main(String[] args) {
    for (int i = 0; i < 45; ++i) {
      System.out.println(i + " -> expected=" + !FALSE_VALUES.contains(i)
        + ", actual=" + f(n->(n-=n*2%3*20)>=0&n!=3, i));
    }
  }
  public static boolean f(java.util.function.Function<Integer, Boolean> f, int n) {
    return f.apply(n);
  }
}
```
[Answer]
# [Add++](https://github.com/SatansSon/AddPlusPlus), 35 bytes
```
D,f,@,A6$%0=@20$%0=A3$%0=A8<A43<s1<
```
[Try it online!](https://tio.run/##S0xJKSj4/99FJ03HQcfRTEXVwNbByABEORqDSQsbRxNjm2JDm////5sYAQA "Add++ – Try It Online")
Look ma, no while loops. Or strings. Or lists. Or really anything that helps save bytes. But mainly because Add++ doesn't know what any of those are.
3 months later, I realised that this was invalid, and fixed it. Somehow, that golfed it by 13 bytes. This is a function that takes one argument and tests whether that argument is a Chicken McNugget number or not.
## How it works
```
D,f,@,                        - Create a monadic (one argument) function called f (example argument: 3)
A                             - Push the argument again; STACK = [3 3]
 6                            - Push 6;                  STACK = [3 3 6]
  $                           - Swap the top two values; STACK = [3 6 3]
   %                          - Modulo;                  STACK = [3 3]
    0                         - Push 0;                  STACK = [3 3 0]
     =                        - Are they equal?          STACK = [3 0]
      @                       - Reverse the stack;       STACK = [0 3]
       20                     - Push 20;                 STACK = [0 3 20]
         $                    - Swap the top two values; STACK = [0 20 3]
          %                   - Modulo;                  STACK = [0 3]
           0                  - Push 0;                  STACK = [0 3 0]
            =                 - Are they equal?          STACK = [0 0]
             A                - Push the argument;       STACK = [0 0 3]
              3               - Push 3;                  STACK = [0 0 3 3]
               $              - Swap the top two values; STACK = [0 0 3 3]
                %             - Modulo;                  STACK = [0 0 0]
                 0            - Push 0;                  STACK = [0 0 0 0]
                  =           - Are they equal?          STACK = [0 0 1]
                   A          - Push the argument;       STACK = [0 0 1 3]
                    8         - Push 8;                  STACK = [0 0 1 3 8]
                     <        - Less than;               STACK = [0 0 1 0]
                      A       - Push the argument;       STACK = [0 0 1 0 3]
                       43     - Push 43;                 STACK = [0 0 1 0 3 43]
                         <    - Less than;               STACK = [0 0 1 0 0]
                          s   - Sum;                     STACK = [1]
                           1  - Push 1;                  STACK = [1 1]
                            < - Less than;               STACK = [0]
```
[Answer]
# [Python 2](https://docs.python.org/2/), 51 bytes
*-1 byte thanks to @LeakyNun*
```
lambda n:max(n>43,25<n>n%3>1,5<n>n%3<1,n in[20,40])
```
[Try it online!](https://tio.run/##LcmxCoAgFAXQX3lLoOBgVkuUP1INRlkP6hriUF9vDW0HzvWkPcBk34/5cOe8OEJ7ulvA1pUyTQeLorKl@tWVCsQYjFa1nmS@IiMNTD5E4i8oOmyraLSWxJ4QEnnBcsov "Python 2 – Try It Online") Footer prints all non McNugget numbers
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 15 bytes
```
fg.{CM"     "{T./
```
[Try it online!](http://pyth.herokuapp.com/?code=fg.%7BCM%22%06%09+%22%7BT.%2F&test_suite=1&test_suite_input=0%0A6%0A7%0A12%0A15%0A21%0A40%0A42&debug=0)
The string contains the characters corresponding to codepoints 6, 9, and 20.
[Answer]
# Haskell, ~~64~~ 56 bytes
I didn't do any bit trickery, but looking at the other answers it might actually be shorter to import the `Bits` module and use those methods. This approach checks much more directly.
```
f x=(\l->elem x[i*6+j*9+k*20|i<-l,j<-l,k<-l,x/=0])[0..x]
```
[Answer]
# Javascript, ~~92~~ ~~78~~ 72 bytes
\*saved 14 bytes thanks to @Jonasw
```
a=>!(a in[0,1,2,3,4,5,7,8,10,11,13,14,16,17,19,22,23,25,28,31,34,37,43])
```
Uses the fact that "All integers are McNugget numbers except 1, 2, 3, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 22, 23, 25, 28, 31, 34, 37, and 43." from @LeakyNun's comment
[Answer]
# [APL (Dyalog)](https://www.dyalog.com/), 19 bytes
```
⊢∊6 9 20+.×⍨∘↑∘⍳3⍴⊢
```
with `⎕IO←0`
Same algorithm with [Dennis's answer](https://codegolf.stackexchange.com/a/132709/6972)
[Try it online!](https://tio.run/##SyzI0U2pTMzJT9dNzkksLs5M/v@ob6qn/6O2CQb/04Dko65Fjzq6zBQsFYwMtPUOT3/Uu@JRx4xHbRNBZO9m40e9W4BKuICagIrTgBTlzP//zbjMuQyNuAxNuYwMuUwMuEyMAA "APL (Dyalog Classic) – Try It Online")
[Answer]
# [Retina](https://github.com/m-ender/retina), 26 bytes
```
.+
$*
^(1{6}|1{9}|1{20})+$
```
[Try it online!](https://tio.run/##K0otycxL/K@q4Z7wX0@bS0WLK07DsNqstsaw2hJEGBnUamqr/P9vxmXOZWjEZWjKZWTIZWLAZWIEAA "Retina – Try It Online")
[Answer]
# Excel, 87 bytes
```
=AND(OR(MOD(A1,3)*MOD(A1,20)*IF(A1>43,MOD(A1-40,3),1)*IF(A1>23,MOD(A1-20,3),1)=0),A1>5)
```
Alternatively, 92 bytes:
```
=CHOOSE(MOD(A1,3)+1,A1>3,IF(A1>43,MOD(A1-40,3)=0,A1=40),IF(A1>23,MOD(ABS(A1-20),3)=0,A1=20))
```
[Answer]
# PHP, 69+1 bytes
```
for($n=$argn;$n>0;$n-=20)if($n%3<1)for($k=$n;$k>0;$k-=9)$k%6||die(1);
```
exits with `1` for a Chicken McNugget Number, `0` else.
Run as pipe with `-n` or [try it online](http://sandbox.onlinephpfunctions.com/code/62476ac2ca9c1cef991499ce4c7cfd847e062c40).
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 10 bytes
```
Œṗḟ€“©µÞ‘Ạ
```
[Try it online!](https://tio.run/##y0rNyan8///opIc7pz/cMf9R05pHDXMOrTy09fC8Rw0zHu5a8P9wO1DQ@fCGIwse7u4@uschC6QGrExB107hUcPcSCAv61HjvkPbgHBr0P//pgYA "Jelly – Try It Online")
Outputs in the opposite direction; returning `false` indicates that the input is a Chicken McNugget number. The TIO footer swaps this for you.
## How it works
```
Œṗḟ€“©µÞ‘Ạ - Main link. Takes an integer n on the left
Œṗ         - Integer partitions of n; all ways to sum integers to n
    “©µÞ‘  - Yield [6, 9, 20]
   €       - Over each partition P:
  ḟ        -   Remove all 6s, 9s and 20s
         Ạ - Are all resulting lists non-empty?
```
[Answer]
# [Python 2](https://docs.python.org/2/), 61 bytes
```
lambda n:n in[int(c,36)for c in'1234578ABDEGHJMNPSV']+[37,43]
```
[Try it online!](https://tio.run/##K6gsycjPM/qfZhvzPycxNyklUSHPKk8hMy86M69EI1nH2EwzLb9IIRkoom5oZGxiam7h6OTi6u7h5esXEBymHqsdbWyuY2Ic@7@gCKhDIU3D2FzzPwA "Python 2 – Try It Online")
[Answer]
# Mathematica, 59 bytes
```
!Select[IntegerPartitions@#,{6,9,20}~SubsetQ~#&]=={}&&#!=0&
```
[Answer]
# Javascript 37 bytes
Takes a positive integer `n` and outputs `true` for Chicken McNugget numbers and `false` for others.
```
F=n=>!(n<0||(n%6&&!F(n-9)&&!F(n-20)))
```
## Explanation
```
F=n=>!(            // negate the internal test for non-Chicken McNugget numbers
    n<0 || (       // if n < 0, or
        n%6 &&     // if n % 6 is truthy,
        !F(n-9) && // and n-9 is not a Chicken McNugget number
        !F(n-20)   // and n-20 is not a Chicken McNugget number
                   // then n is not a Chicken McNugget number
    )
)
```
The recursion on this function is heinous, and for any sufficiently large `n`, you will exceed call stack limits. Here's a version that avoids those limits by checking if `n` is larger than the largest non-Chicken McNugget number (43 bytes [bonus points for being the largest non-Chicken McNugget number?]):
```
F=n=>n>43||!(n<0||(n%6&&!F(n-9)&&!F(n-20)))
```
```
F=n=>n>43||!(n<0||(n%6&&!F(n-9)&&!F(n-20)))
$('#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>
```
[Answer]
# JavaScript ES5, 46 bytes
```
n=>n>5&&(!(n%20)||(n<24?!(n%3):n<44?n%3-1:1));
```
**Explicit boolean answer, 50 bytes:**
```
n=>!!(n>5&&(!(n%20)||(n<24?!(n%3):n<44?n%3-1:1)));
```
Clumsy, but it gets the job done. Returns `false` or `0` for every value that isn't 0, 1, 2, 3, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 22, 23, 25, 28, 31, 34, 37, or 43, and `true`, `-1`, or `1` for everything else.
Explicit solution returns `true` or `false` only.
```
n=>!!(                                          ); forces Boolean type (optional)
      n>5                                          false for 0, 1, 2, 3, 4, 5 (and negative inputs)
            !(n%20)                                explicit true for 20, 40
                      n<24?!(n%3)                  false for 7, 8, 10, 11, 13, 14, 16, 17, 19, 22, 23
                                  n<44?n%3-1       false for 25, 28, 31, 34, 37, 43
```
[Answer]
# Clojure 33 bytes
An on ok quick attempt: `#(-> %(rem 20)(rem 9)(rem 6)(= 0))`
[Answer]
# [Pari/GP](http://pari.math.u-bordeaux.fr/), 44 bytes
```
n->n&&#(1/(1-x^6)/(1-x^9)/(1-x^20)%x^n++)==n
```
[Try it online!](https://tio.run/##K0gsytRNL/ifpmCr8D9P1y5PTU1Zw1Bfw1C3Is5ME0JbQmkjA03Virg8bW1NW9u8/2n5RRp5QF0GOgqmQFxQlJlXAhRQUtC1AxJpGnmampr/AQ "Pari/GP – Try It Online")
]