user15366: I am using Adafruit Neopixel Library to work with a strand of 21 RGB LEDs.
AT this point only the first 16 light up. It is not a soldering problem, battery issue or a short.
This troubleshooting page suggests to 

"confirm that the number of LEDs in the LPD8806() constructor match the
  number of LEDs in the strip (both will be 32 if using the strandtest
  example and a single meter of LEDs)."

But looking at the library code below, I am not certain where to modify. Adafruit_Neopixel master zip has 2 files, which contain source code. One is Adafruit_Neopixel.cpp and the other Adafruit_Neopixel.h.
Thank you. 

user10794: You don't modify the library at all. The page refers to the constructor which is the last line here:
#include <Adafruit_NeoPixel.h>

#define PIN 6

Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, PIN, NEO_GRB + NEO_KHZ800);

So that would send to 60 NeoPixels. Change the 60 to however-many you have.
To compare, try running my library here. That doesn't use the Adafruit library. Use the minimal demo code, and change PIXELS to be 21.
#include <SPI.h>
#include <NeoPixels_SPI.h>

const unsigned int PIXELS = 8; // Number of pixels in the string

void setup ()
  {
  ledsetup();
  showColor (PIXELS, 0xB2, 0x22, 0x22);  // firebrick
  } // end of setup

void loop ()
  {
  } // end of loop

Note that you connect the NeoPixels data to pin D11 of your Uno in this case.


@Paul 2000mAh at 3.7V Lipo battery



according to the comment in the main question he's powering 21 LED's off a "2000mAh at 3.7V Lipo battery"

Yes, well let's look at the specs:

If you lose 0.2V over the first 8 LEDs you are under spec for the voltage.

user8033: 
When something works, but not completely, it's often due to power issues.

Embedded things, microcontrollers/Arduino are fairly robust and "logical".
Hence, if your Arduino program works today, it'll work tomorrow.
Analog devices, or electricity is (in my eyes) often a bit vague. A chip can get enough power to run, but not enough to work properly.
The NeoPixel
Adafruit has an extremely elaborated tutorial/userguide.

Powering the NeoPixels

This also seems to fit your problem.

You could try powering the strip from the middle.
Since your voltage isn't stable, your amperage might not be as high and the resistance may be a little big. It's actually quite impressive that it works.

Each NeoPixel can draw up to 60 milliamps at full brightness.

2000mAh does not mean it can (always) deliver 2000mA. It depends on the "C" or discharge rating of the battery. So if your battery is rated 0.5 C it'll only be able to supply 1000mA (for 2 hours).
60*21 would be well over 1000mA, actually 60*16 is just below 1mA, so this would fit your problem.

The voltage of a battery depends on how much charge it has.

Check google for: "LiPo voltage drop"

If all else fails

There is a chance that that particular LED is broken. The signal will not continue to the other LED's and thus the light of the strip will end there.
Try to drive the LED's behind the LED that fails. (With the power supply closer).
I'm also not sure if you can supply 3.7V and then use 5V logic. Things like that would often break a microcontroller (when running on 3.3V, you usually can't receive 5V?)

15366: <p>I am using <a href="https://github.com/adafruit/Adafruit_NeoPixel" rel="nofollow">Adafruit Neopixel Library</a> to work with a strand of 21 RGB LEDs.
AT this point only the first 16 light up. It is not a soldering problem, battery issue or a short.
<a href="https://learn.adafruit.com/digital-led-strip/troubleshooting" rel="nofollow">This</a> troubleshooting page suggests to </p>

<blockquote>
  <p>"confirm that the number of LEDs in the LPD8806() constructor match the
  number of LEDs in the strip (both will be 32 if using the strandtest
  example and a single meter of LEDs)."</p>
</blockquote>

<p>But looking at the library code below, I am not certain where to modify. Adafruit_Neopixel master zip has 2 files, which contain source code. One is <a href="https://github.com/adafruit/Adafruit_NeoPixel/blob/master/Adafruit_NeoPixel.cpp" rel="nofollow">Adafruit_Neopixel.cpp</a> and the other <a href="https://github.com/adafruit/Adafruit_NeoPixel/blob/master/Adafruit_NeoPixel.h" rel="nofollow">Adafruit_Neopixel.h</a>.</p>

<p>Thank you. </p>
 10794: <p>You don't modify the library at all. The page refers to the <em>constructor</em> which is the last line here:</p>



<pre class="lang-C++ prettyprint-override"><code>#include &lt;Adafruit_NeoPixel.h&gt;

#define PIN 6

Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, PIN, NEO_GRB + NEO_KHZ800);
</code></pre>

<p>So that would send to 60 NeoPixels. Change the 60 to however-many you have.</p>

<p>To compare, try running my library <a href="http://www.gammon.com.au/forum/?id=13357" rel="nofollow noreferrer">here</a>. That doesn't use the Adafruit library. Use the minimal demo code, and change PIXELS to be 21.</p>

<pre class="lang-C++ prettyprint-override"><code>#include &lt;SPI.h&gt;
#include &lt;NeoPixels_SPI.h&gt;

const unsigned int PIXELS = 8; // Number of pixels in the string

void setup ()
  {
  ledsetup();
  showColor (PIXELS, 0xB2, 0x22, 0x22);  // firebrick
  } // end of setup

void loop ()
  {
  } // end of loop
</code></pre>

<p>Note that you connect the NeoPixels data to pin D11 of your Uno in this case.</p>

<hr>

<blockquote>
  <p>@Paul 2000mAh at 3.7V Lipo battery</p>
</blockquote>

<hr>

<blockquote>
  <p>according to the comment in the main question he's powering 21 LED's off a "2000mAh at 3.7V Lipo battery"</p>
</blockquote>

<p>Yes, well let's look at the specs:</p>

<p><a href="https://i.stack.imgur.com/9Ue3l.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9Ue3l.png" alt="WS2812 specs"></a></p>

<p>If you lose 0.2V over the first 8 LEDs you are under spec for the voltage.</p>
 8033: <blockquote>
  <p>When something works, but not completely, it's often due to power issues.</p>
</blockquote>

<p>Embedded things, microcontrollers/Arduino are fairly robust and "logical".
Hence, if your Arduino program works today, it'll work tomorrow.</p>

<p>Analog devices, or electricity is (in my eyes) often a bit vague. A chip can get enough power to run, but not enough to work properly.</p>

<p><strong>The NeoPixel</strong></p>

<p>Adafruit has an extremely elaborated <a href="https://learn.adafruit.com/downloads/pdf/adafruit-neopixel-uberguide.pdf" rel="noreferrer">tutorial/userguide</a>.</p>

<blockquote>
  <p>Powering the NeoPixels</p>
</blockquote>

<p>This also seems to fit your problem.</p>

<p><a href="https://i.stack.imgur.com/rjnXI.png" rel="noreferrer"><img src="https://i.stack.imgur.com/rjnXI.png" alt="enter image description here"></a></p>

<p>You could try powering the strip from the middle.
Since your voltage isn't stable, your amperage might not be as high and the resistance may be a little big. It's actually quite impressive that it works.</p>

<blockquote>
  <p>Each NeoPixel can draw up to 60 milliamps at full brightness.</p>
</blockquote>

<p>2000mAh does not mean it can (always) deliver 2000mA. It depends on the "C" or discharge rating of the battery. So if your battery is rated 0.5 C it'll only be able to supply 1000mA (for 2 hours).</p>

<p>60*21 would be well over 1000mA, actually 60*16 is just below 1mA, so this would fit your problem.</p>

<blockquote>
  <p>The voltage of a battery depends on how much charge it has.</p>
</blockquote>

<p>Check google for: <a href="https://dlnmh9ip6v2uc.cloudfront.net/assets/6/7/4/7/9/5112a224ce395fb479000003.png" rel="noreferrer">"LiPo voltage drop"</a></p>

<blockquote>
  <p>If all else fails</p>
</blockquote>

<p>There is a chance that that particular LED is broken. The signal will not continue to the other LED's and thus the light of the strip will end there.
Try to drive the LED's behind the LED that fails. (With the power supply closer).</p>

<p>I'm also not sure if you can supply 3.7V and then use 5V logic. Things like that would often break a microcontroller (when running on 3.3V, you usually can't receive 5V?)</p>
