#!/usr/bin/env wolframscript

Do[p = PolygonalNumber[3, n]; l = Length[Divisors[p]]; 
 If[l > 500, Print[{n, p, l}]], {n, 1, 100000}]

