limite = 1001 dim a(limite) for n = 0 to limite-1 for m = n-1 to 0 step -1 if a(m) = a(n) then a(n+1) = n-m break fi next m next n print "Secuencia de Van Eck: \n" print "Primeros 10 terminos: "; for i = 0 to 9 print a(i), " "; next i print "\nTerminos 991 al 1000: "; for i = 990 to 999 print a(i), " "; next i print