def f(n)
  n + (0.5 + Math.sqrt(n)).floor
end

(1..22).each { |n| puts  }

non_squares = (1..1_000_000).map { |n| f(n) }
squares = (1..1001).map { |n| n**2 } 
(squares & non_squares).each do |n|
  puts 
end