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

 Looking for a square result (Posted on 2018-06-14)
For each positive integer n, let Mn be the square matrix (nxn) where each diagonal entry is 2018, and every other entry is 1.

Determine the smallest positive integer n (if any) for which the value
of det(Mn) is a perfect square.

 No Solution Yet Submitted by Ady TZIDON No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 re(2): computer solution | Comment 5 of 18 |
(In reply to re: computer solution by Charlie)

Right - I assumed only the main diagonal was 2018s  - I wonder which way is right.

I also encountered roundoff errors. Going to higher precision I get
possibly that n=6, 8, 10 may be squares. But I think the polynomial form should be able to be expressed as a square, no?

program dee

implicit none

real*8 xn,xi,xj,det,d,rdet

integer n

d=2018.

print*,'         n              det             sqrt(det)'

print*,'         ----------------------------------------'

do n=3,10

xn=n

if(2*(n/2).eq.n)then

xi=xn/2.

det= d**xn - xi*d +(xi-1)

else

det= d**xn - xn*d + (xn-1)

endif

rdet=sqrt(det)

print*,n,det,rdet

enddo

end

n              det             sqrt(det)

----------------------------------------

3   8217943780.0000000        90652.875188821228

4   16583822756941.000        4072323.9995045825

5   33466154331639484.        182937569.49199769

6   6.7534699441268818E+019   8217949831.9999990

7   1.3628502347248049E+023   369168015234.90692

8   2.7502317736746564E+026   16583822760976.000

9   5.5499677192754564E+029   744981054744042.25

10   1.1199834857497871E+033   33466154331649568.

Edited on June 15, 2018, 9:37 am
 Posted by Steven Lord on 2018-06-15 09:35:39

 Search: Search body:
Forums (0)