#include #include #include int main() { int *ar,i,ITERATIONS,j,k,PENTAGONALS,res; ITERATIONS=26753; // Maximun number of cycles. // It has been chosen considering that // the sum of 2 pentagonals has not to // exceed the integer representability PENTAGONALS=37837; // Maximun number of calculable values // in the integer representability. ar=malloc(PENTAGONALS*4); for(i=0;i++ar[k];); if(res==ar[k]) { res=abs(ar[j]-ar[i]); for(k=0;++kar[k];); if(res==ar[k]) printf("%i-%i=%i\n",ar[j],ar[i],res); } } } return 0; }