Successful while Compiling but code not getting executed

I’m very new to Arduino programming. This is only my second program. It’s objective is to ensure sequential flashing of the leds. The first one is supposed to light up, then after 200 ms, turn off. Then the second one has to repeat the same process, and ditto the third one as well. This has to happen some n times.
So I tried this code:

int i=0,j=0;
int ledpin[] = {1,2,3};

void setup() {
  for(i=0;i<3;i++){
    pinMode(ledpin[i+1],OUTPUT);
  }
}

void loop() {
  for(j=0;j<5;j++){
    for(i=0;i<=2;i++){
      digitalWrite(ledpin[i+1],HIGH);
      delay(200);
      digitalWrite(ledpin[i+1],LOW);
      delay(200);
    }
  }
}

My reasoning for this:
Well, I figured this is the easier way of doing it, because the alternative would be typing digitalWrite(… twice over for each led. What if I wanted to do this with five leds? It would be a tedious task, no? So I wrote an array in setup() containing the pins each led was connected to, and I initialized them all in a loop. Then I wrote the loop() body.
On compiling, I didn’t get any error, but somehow, the leds don’t light up at all. So…

a.) Should I not have written a loop in setup() at all? If that isn’t the problem, then,
b.) What is the problem?

ledpin[i+1]Why?
Why not ledpin[i]

Think about what AWOL said:

i = 0 led[0 + 1] = led[1]
i = 1 led[1 + 1] = led[2]
i = 2 led[2 + 1] = led[3] // Uh-oh

But your array only has allocated space for led[0] - led[2]. Look at the other loops, too.

Thanks for the really quick reply guys.
@econjack
Now this is my updated code:

int i=1;
int ledpin[] = {1,2,3};
void setup() {
  for(i=1;i<=3;i++){
    pinMode(ledpin[i],OUTPUT);
  }
}
void loop() {
    for(i=1;i<=3;i++){
      digitalWrite(ledpin[i],HIGH);
      delay(1000);
      digitalWrite(ledpin[i],LOW);
      delay(1000);
    }
}

Well, now leds 2 and 3 are blinking fine, but led 1 just remains stubbornly dim lit.
Any advice?

for(i=0;i<3;i++){

You're confusing your PIN numbers with the indices to the array.

ledpin[0] is pin 1.

Delta_G and AWOL:
Okay, so the nth index in the array corresponds to (n+1)th pin?
So it’s just:
for(i = 0;i<3;i++)
Thanks a mil, all. Sorry if I kept anyone up late.

so the nth index in the array corresponds to (n+1)th

Only because that is what the array elements contain in this case.
(I'm making the evening meal, so bedtime is some way off - thanks for your kind thought)

This off-by-one issue is commonly called a "fence post error", after this illustrative example:

If you have a 100 meter fence, and want to place a post every 1 meter, how many fence posts do you need?

The answer is not "100".