mecej4
Joined: 31 Oct 2006 Posts: 1925
|
Posted: Thu Nov 20, 2025 2:00 pm Post subject: Kudos to Silverfrost |
|
|
The following short program came out of a discussion at Fortran.Discourse.Group. When run, it reproduces the result from the 1966 paper by Lander and Parkin in 1966, which disproved the long-standing Euler Conjecture on the sum of fifth powers of integers. The current version of FTN95 compiles the program successfully. The 64 bit EXE runs in about 1 second, and outputs the expected result.
Congratulations, Silverfrost!
| Code: |
!
! 27^5 + 84^5 + 110^5 + 133^5 = 144^5
!
program euler
use, intrinsic :: iso_fortran_env, only: int64
implicit none
integer(int64), parameter :: nmax = 150
integer(int64) :: i,j, k, l, m
integer(int64) :: n5(nmax)
outer: do i = 1, nmax
n5(i) = i**5 !overflow when i=74
do j = 1, i
do k = 1, j
do l = 1, k
do m = 1, l
if ( n5(j)+n5(k)+n5(l)+n5(m) == n5(i) ) then
print *, "i^5 = ", n5(i)
print *, j, k, l, m, i
exit outer
end if
end do
end do
end do
end do
end do outer
end program euler |
[url]Here is a link to the 1966 paper:[/url]
https://community.intel.com/t5/image/serverpage/image-id/11600iD6EE41CC15A31C45/image-size/large/is-moderation-mode/true?v=v2&px=999&whitelist-exif-data=Orientation%252CResolution%252COriginalDefaultFinalSize%252CCopyright |
|