You have them wired like this:
---2--- ---3--- ---4--- ---5--- ---2--- ---3--- ---4--- ---2--- ---3--- ---2--- PIN#
-- /\ -- /\ -- /\ -- /\ -- /\ -- /\ -- /\ -- /\ -- /\ -- /\
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 LED#
\/ -- \/ -- \/ -- \/ -- \/ -- \/ -- \/ -- \/ -- \/ -- \/ --
---3--- ---4--- ---5--- ---6--- ---4--- ---5--- ---6--- ---5--- ---6--- ---6--- PIN#
That looks a lot like the schamtic previously posted in this thread. And, that's a handy way of making a schematic, but it's certainly not the only way to wire the LEDs. When you charlieplex, you have to match your code to your wiring.
Here's the arrangement that I had in mind:
---2--- ---2--- ---2--- ---2--- ---3--- ---3--- ---3--- ---4--- ---4--- ---5--- PIN#
-- /\ -- /\ -- /\ -- /\ -- /\ -- /\ -- /\ -- /\ -- /\ -- /\
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 LED#
\/ -- \/ -- \/ -- \/ -- \/ -- \/ -- \/ -- \/ -- \/ -- \/ --
---3--- ---4--- ---5--- ---6--- ---4--- ---5--- ---6--- ---5--- ---6--- ---6--- PIN#
Notice that it looks a lot like the code: the upper pins are the slowly-varying index, and the lower pins are the rapidly-varying index.
There's a straightforward solution that doesn't involve rewiring. Define an array, NLEDS x 2, that holds the LOW pin and the HIGH pin for each pair of LEDs. To light one, get its pins, and manipulate the outputs to light it up. A code snippet might be:
for (uint8_t i=2;i<=NLEDS;i++) {
pinMode(LEDArray[i][0],OUTPUT);
pinMode(LEDArray[i][1],OUTPUT);
digitalWrite(LEDArray[i][0],HIGH);
delay(<something>);
digitalWrite(LEDArray[i][0],LOW);
digitalWrite(LEDArray[i][1],HIGH);
delay(<something>);
pinMode(LEDArray[i][0],INPUT);
pinMode(LEDArray[i][1],INPUT);
...
If you don't get the array right the first time, trial and error will get the answer. For your wiring, this might be the array:
{2,3},{3,4},{4,5},{5,6},{2,4},{3,5},{4,6},{2,5},{3,6},{2,6}