Multiple leds blink with same interval, but different stay on time - duration

Hello. I need to make blink 3 leds every 5 minutes, when 1st led have own "ON time -duration", but 2nd and 3rd led have the same "ON time - duration".
No one of leds can not bee light up in the same time.
I cann not figure out how to run 1st cycle on o millis(), 2nd after 10000 millis, and 3rd 20000.

my testing code:

const int ledPin_1 =  8;// the number of the LED pin
int ledState_1 = LOW;             // ledState_1 used to set the LED
int SolOnTime_1 = 200;
unsigned long ledStateOn_1;
unsigned long ledStateOff_1;
unsigned long previousMillis_1 = 0;        // will store last time LED was updated
const long interval_1 = 5000;           // interval_1 at which to blink (milliseconds)

const int ledPin_2 =  9;// the number of the LED pin
int ledState_2 = LOW;             // ledState_2 used to set the LED
int SolOnTime_2 = 400;
unsigned long ledStateOn_2;
unsigned long ledStateOff_2;
unsigned long previousMillis_2;        // will store last time LED was updated
const long interval_2 = 5000;           // interval_2 at which to blink (milliseconds)
void setup() {
  Serial.begin(9600);
  pinMode(ledPin_1, OUTPUT);
  pinMode(ledPin_2, OUTPUT);
}
void loop(){
  led_1();
  led_2();
}
//********************************** START led_1 ***************************************************************
  void led_1(){
  unsigned long currentMillis = millis();

  if (currentMillis - previousMillis_1 >= interval_1) {
    previousMillis_1 = currentMillis; //Serial.print(" previousMillis_1 = "); Serial.print(previousMillis_1);
    if (ledState_1 == LOW) {
      ledState_1 = HIGH;
      ledStateOn_1 = millis(); //Serial.print("    ledStateOn_1 = "); Serial.print(ledStateOn_1);
      Serial.print("sol_1 On = "); Serial.print(ledStateOn_1);
    } 
    digitalWrite(ledPin_1, ledState_1);
  }
  if (millis() - ledStateOn_1 >= SolOnTime_1){
      if (ledState_1 == HIGH){
        ledState_1 = LOW;
      ledStateOff_1 = millis(); //Serial.print(" ledStateOff_1 = "); Serial.println(ledStateOff_1);
      Serial.print("    Off = "); Serial.println(ledStateOff_1);
      } 
    digitalWrite(ledPin_1, ledState_1);
    }
}
//********************************** END led_1 ***************************************************************

//********************************** START led_2 ***************************************************************
  void led_2(){
  unsigned long currentMillis = millis();

  if (currentMillis - previousMillis_2 >= interval_2) {
    previousMillis_2 = currentMillis; //Serial.print(" previousMillis_2 = "); Serial.print(previousMillis_2);
    if (ledState_2 == LOW) {
      ledState_2 = HIGH;
      ledStateOn_2 = millis(); //Serial.print("    ledStateOn_2 = "); Serial.print(ledStateOn_2);
      Serial.print("sol_2 On = "); Serial.print(ledStateOn_2);
    } 
    digitalWrite(ledPin_2, ledState_2);
  }
  if (millis() - ledStateOn_2 >= SolOnTime_2){
      if (ledState_2 == HIGH){
        ledState_2 = LOW;
      ledStateOff_2 = millis(); //Serial.print(" ledStateOff_2 = "); Serial.println(ledStateOff_2);
      Serial.print("    Off = "); Serial.println(ledStateOff_2);
      } 
    digitalWrite(ledPin_2, ledState_2);
    }
}
//********************************** END led_2 ***************************************************************

a little timing diagram illustrating how the 3 LEDs should blink in sequence would certainly help us understand what you want to achieve. A hand sketch or an actual drawing would do so long as you can post the image! :slight_smile:

Something like the code below would allow you to set the on/off periods for any number of LEDs

const byte ledPins[] = {3,5,6,9};
const byte NUMBER_OF_LEDS = sizeof(ledPins);
unsigned long startTimes[NUMBER_OF_LEDS] = {};
byte indexes[NUMBER_OF_LEDS] = {0};
const byte MAX_NUMBER_OF_PERIODS = 10;
unsigned long periods[][MAX_NUMBER_OF_PERIODS] =    //periods for each LED.  zero indicates end of sequence
{
  {1000, 2000, 1500, 2500, 0},
  {500, 200, 1000, 2000, 3000, 4000, 0},
  {400, 1000, 1500, 2000, 0},
  {1100, 2200, 0}
};

void setup()
{
  Serial.begin(115200);
  for (int led = 0; led < NUMBER_OF_LEDS; led++)
  {
    pinMode(ledPins[led], OUTPUT);
  }
}

void loop()
{
  unsigned long currentTime = millis();
  for (int led = 0; led < NUMBER_OF_LEDS; led++)  //iterate through the LEDs
  {
    if (currentTime - startTimes[led] >= periods[led][indexes[led]])  //? time to change ?
    {
      digitalWrite(ledPins[led], !digitalRead(ledPins[led]));  //flip led state
      startTimes[led] = currentTime;  //save start time of state
      indexes[led]++;                    //increment index
    }
    if (periods[led][indexes[led]] == 0)  //if next period is zero (end of sequence)
    {
      indexes[led] = 0;        //reset period index for this LED
    }
  }  //end for loop
}

The on/off periods for each LED are held in an array, one row for each LED and one column for each period