That's a great explanation, though I'm still wondering if there is a way to mark the expression as variable since if I use Table[Length[Divisors[PolygonalNumber[x]]] - 1, {x, 100}]
, it shows the list of computed factors correctly. I thought Solve[]
would not prematurely evaluate an expression containing the variable to be solved for...
And yes, how I approach these problems is typically to design a theoretical brute-force method and then refactor the solution until it runs well and makes sense conceptually. In this case, though, I was able to use Table[]
with the function and just tried a large range for x and it found the answer in a second or two. Still wondering if this could have been avoided with other functions that don't require an explicit range of values to be evaluated.