input: from typing import List
  
  def perform_linear_regression(X: List[float], Y: List[float]) -> List[float]:
      """ Perform linear regression for predicting the numbers in a given dataset.
      >>> perform_linear_regression([1,2,3,4,5], [3,5,7,9,13])
      [14.5]
      """
output:     n = len(X)
      sum_X = sum(X)
      sum_Y = sum(Y)
      sum_XY = sum(x * y for x, y in zip(X, Y))
      sum_X_squared = sum(x ** 2 for x in X)
      
      slope = (n * sum_XY - sum_X * sum_Y) / (n * sum_X_squared - sum_X ** 2)
      intercept = (sum_Y - slope * sum_X) / n
      
      return [intercept + slope * (n + 1)]