random blinking without delay and blinking with delay in 1

It is allowed to change the interval runtime for random blinking:

const int ledPin = LED_BUILTIN;

unsigned long previousMillis;
unsigned long interval = 200UL;   // not a constant, it will be changed

void setup() 
{
  pinMode( ledPin, OUTPUT);
}

void loop() 
{
  unsigned long currentMillis = millis();

  if( currentMillis - previousMillis >= interval) 
  {
    previousMillis = currentMillis;
    interval = random( 100, 500);   // set the new interval

    // toggle
    digitalWrite( ledPin, digitalRead( ledPin) == HIGH ? LOW : HIGH);
  }
}

There are many ways to blink three times and then wait some time using millis(). The most silly one is to have a counter and do certain things at specific counter values:

const int ledPin = LED_BUILTIN;

unsigned long previousMillis;
const unsigned long interval = 50;
int counter = 0;

void setup() 
{
  pinMode( ledPin, OUTPUT);
}

void loop() 
{
  unsigned long currentMillis = millis();

  if( currentMillis - previousMillis >= interval) 
  {
    previousMillis = currentMillis;

    // Select what to do with certain values of counter.
    switch( counter)
    {
      case 0:
      case 2:
      case 4:
        digitalWrite( ledPin, HIGH);
        break;
      case 1:
      case 3:
      case 5:
        digitalWrite( ledPin, LOW);
        break;
    }

    counter++;
    if( counter >= 25)
    {
      counter = 0;
    }
  }
}