All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Cubic and Consecutive Concern II (Posted on 2010-05-31)
Determine the probability that for a positive base ten integer N drawn at random between 2 and 201 inclusively, the number N3 - 1 is expressible in the form p*q*r, where p, q and r are three distinct positive integers such that p, q and r (in this order) corresponds to three consecutive terms of an arithmetic progression.

 No Solution Yet Submitted by K Sengupta Rating: 3.5000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 Program Solution | Comment 3 of 10 |

I took the arithmetic sequence as q-d, q, q+d.  Then N^3-1=(q-d)*q*(q+d) and d=sqrt(q^2-(N^3-1)/q)

q must be at least as large as N, otherwise the product would be too small because q+d could not be large enough to compensate for q and q-d less than N. Similarily, q must be less than N^1.5 because if it was larger then q*(q+d) would already exceed N.

Then I wrote a short UBASIC program which looped N=2 to 201, and for each N looped q from N to n^1.5:

`10 for n=2 to 20119 qmax=int(n^1.5)20 q=n to qmax30 if (n*n*n-1)@q<>0 then 7040 x=q*q-(n*n*n-1)/q41 d=isqrt(x)50 if d*d=x then print n,q-d;q;q+d70 next q80 next n`
`Running this short program finds:9       2  14  2625      2  63  12449      2  172  34281      2  365  728100     27  143  259121     45  152  259121     28  185  342121     2  666  1330169     2  1099  2196196     117  211  305`

There are 8 distinct values for N: 9,25,49,81,100,121,169,196 for a probability of 1/25.  Continuing the program finds that not all N are perfect squares.  N=273 is an answer with sequence 38, 527, 1016.

 Posted by Brian Smith on 2010-06-01 01:38:21

 Search: Search body:
Forums (0)