func nxtprim p .
   j = 2
   while j * j <= p
      if p mod j = 0
         j = 1
         p += 1
      .
      j += 1
   .
   return p
.
num1[] = [ 5 45 23 21 67 ]
num2[] = [ 43 22 78 46 38 ]
num3[] = [ 9 98 12 54 53 ]
n = len num1[]
len nums[] n
for i to n
   nums[i] = nxtprim higher higher num1[i] num2[i] num3[i]
.
print nums[]
