My 3 Leds clock needs help

need help and guide to program my 3 leds clock.
My idea about this 3 leds clock is that every 3 leds flashes in 3 different interval of 300, 500 and 1000 to represent 9 number, and when they all flash at 100 mills-second time interval, it means 0.
Below is the code I have written so far, I want to push a number to add 1 to number and have the leds flash the equivalent number.
Any help will be appreciated.

int rLed[]={1,2,3};
int gLed=4;
int bt=5;
int ledstate[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
unsigned long pstimer[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int number=-1;
int psbtread=1;

void setup(){
pinMode(1, OUTPUT);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, INPUT_PULLUP);
}

void loop(){  

int btread= digitalRead(5);
if (btread !=psbtread){
  if (btread == LOW){
  psbtread=btread;
  number++;
}}

if(number==0) {
  ledblink (100, 1, 0);
  ledblink (100, 2, 10);
  ledblink (100, 3, 11); }

if(number==1) ledblink (1000, 1, 1);
if(number==2) ledblink (500, 1, 2);
if(number==3) ledblink (300, 1, 3);

if(number==4) ledblink (1000, 2, 4);
if(number==5) ledblink (500, 2, 5);
if(number==6) ledblink (300, 2, 6);

if(number==7) ledblink (1000, 3, 7);
if(number==8) ledblink (500, 3, 8);
if(number==9) ledblink (300, 3, 9);

}



int ledblink(int sec, int pin,int x){
unsigned long timer[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
timer[x]=millis();
if(timer[x] - pstimer[x] > sec){
pstimer[x]=timer[x];
if (ledstate[x]==0)ledstate[x]=1;
else ledstate[x]=0;
digitalWrite(pin, ledstate[x]);
}

}

I think you mean that you have three outputs, and you want each output to blink at one of four distinct frequencies.

In that case I'd use the code in 'blink without delay' but use an array to hold the pin numbers, blink intervals and blink times for each output. Then just process all the outputs in a FOR loop testing whether it is time for any of them to change output state.

It would need some simple code to convert your nine possible output states to the corresponding set of output blink intervals.

As a subtlety, when switching to 'zero' you would probably want to reset all the blink times so all the outputs are in phase with each other.

thanks for the help

PeterH:
I think you mean that you have three outputs, and you want each output to blink at one of four distinct frequencies.

In that case I'd use the code in 'blink without delay' but use an array to hold the pin numbers, blink intervals and blink times for each output. Then just process all the outputs in a FOR loop testing whether it is time for any of them to change output state.

It would need some simple code to convert your nine possible output states to the corresponding set of output blink intervals.

As a subtlety, when switching to 'zero' you would probably want to reset all the blink times so all the outputs are in phase with each other.