title: Sum Series 12 32 52 2N 12 1
signature: sum_series_12_32_52_2n_12_1 <- function(n) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(n, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(n), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          84L, 
          790244L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          74L, 
          540274L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          91L, 
          1004731L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          34L, 
          52394L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          36L, 
          62196L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          28L, 
          29260L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          70L, 
          457310L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          7L, 
          455L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          24L, 
          18424L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          47L, 
          138415L
      )))
  
  }
  
  main()
source_py: def sum_series_12_32_52_2n_12_1(n):
      return int((((n * ((2 * n) - 1)) * ((2 * n) + 1)) / 3))
source_cpp: int sum_series_12_32_52_2n_12_1(int n) {
    return ( n * ( 2 * n - 1 ) * ( 2 * n + 1 ) ) / 3;
  }