title: Sum Series 12 32 52 2N 12
signature: function sumSeries1232522N12(n) {
test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value) {
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual, expected){
      return convertToString(actual)===convertToString(expected);
  }
  
  function driver(n, expected){
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(n),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(14, 3654);
    console.log(`TEST-0...${result}`);
  
    result = driver(61, 302621);
    console.log(`TEST-1...${result}`);
  
    result = driver(37, 67525);
    console.log(`TEST-2...${result}`);
  
    result = driver(86, 848046);
    console.log(`TEST-3...${result}`);
  
    result = driver(47, 138415);
    console.log(`TEST-4...${result}`);
  
    result = driver(98, 1254890);
    console.log(`TEST-5...${result}`);
  
    result = driver(70, 457310);
    console.log(`TEST-6...${result}`);
  
    result = driver(24, 18424);
    console.log(`TEST-7...${result}`);
  
    result = driver(76, 585276);
    console.log(`TEST-8...${result}`);
  
    result = driver(24, 18424);
    console.log(`TEST-9...${result}`);
  
    process.exit(0);
  };
  
  if (require.main === module) {
    main();
  }
source_py: def sum_series_12_32_52_2n_12(n):
      sum = 0
      for i in range(1, (n + 1)):
          sum = (sum + (((2 * i) - 1) * ((2 * i) - 1)))
      return sum
source_cpp: int sum_series_12_32_52_2n_12(int n) {
    int sum = 0;
    for ( int i = 1;
    i <= n;
    i ++ ) sum = sum + ( 2 * i - 1 ) * ( 2 * i - 1 );
    return sum;
  }