Generate a mantis's head (symmetrical triangle)
Jelly, 15 bytes
RØ.ṗŒpFS=ɗƇUƑƇḢ

Try it online!
-1 byte thanks to caird coinheringaahing
RØ.ṗŒpFS=ɗƇUƑƇḢ  Main Link; accepts w as the left argument and n as the right argument
R                Range; [1, 2, ..., w]
 Ø.ṗ             [0, 1] ~ cartesian power ~ ^
    Œp           Cartesian Product of ^'s items - this gets all valid triangles of the right size
      ---ɗƇ      Keep elements where
       S         the sum of
      F          the triangle flattened
        =        equals (right argument)
             Ƈ   Keep elements where
            Ƒ    the element is the same when
           U     each sub-list is reversed
              Ḣ  Get the first such triangle