View Single Post
Old 2019-06-15, 11:45   #1
vasyannyasha
 
vasyannyasha's Avatar
 
"Vasiliy"
Apr 2017
Ukraine

22×3×5 Posts
Default Searching many formulas to one limit

Hi guys!
This is formula for nth r-gonal pyramidal number
P_n^r= \frac{3n^2 + n^3(r-2) - n(r-5)}{6}
I have , for example 2<r<1000.
And i want to search all this numbers to one constant border(for example 1015)
How i can find such n's in C++?
Pre-thanks
vasyannyasha is offline   Reply With Quote