Series from For loop (is there a repository for Integer Sequences?)

@GoToLoop Is this correct (below)?

int[] seq4_1_20, seqNeg4_1_20, seq1_10_Neg10;
int lo, dir;


void setup() {
  seq4_1_20 = first_function(4, 20);
  seqNeg4_1_20 = first_function(4, -20);
  seq1_10_Neg10 = second_function(-1, 10, -10);

  println(seq4_1_20);
  println();
  println(seqNeg4_1_20);
  println();
  println(seq1_10_Neg10);

  exit();
}

int[] first_function(int n, int hi) {

  if (hi >= 0) {
    lo = 1;
  } else {
    lo = -1;
  }
  return second_function(n, lo, hi);
}


int[] second_function(int n, int lo, int hi) {

  int nn = abs(n);
  int len = (abs(hi - lo) + 1) * nn;
  if (hi >= lo) {
    dir = 1;
  } else {
    dir = -1;
  }
  int seq [ ] = new int[len];


  for (int i = 0; i < len; i++) {
    seq[i] = i / nn * dir + lo;
  }

  return seq;
}