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

Home > Numbers
A 3-digit number (Posted on 2018-10-27) Difficulty: 3 of 5
What is the smallest palindromic prime whose cube can be expressed as the sum of three odd cubes ?

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
computer soln | Comment 1 of 4
I wonder if 3 is palindromic. If not, 757 fits the bill as below: 

rabbit-3:~ lord$ t3

     3 =    1^3    +     1^3    +     1^3

   757 =    1^3    +     3^3    +     9^3

 16561 =   13^3    +    13^3    +    23^3

 73037 =   19^3    +    19^3    +    39^3

 77977 =   13^3    +    19^3    +    41^3


rabbit-3:~ lord$ more t3.f

        program t3

        implicit none

        integer*8 y3(1000000,4),num(8),i1,i2,i3,icnt,

        1 i,j,ndig,n,dum,half

        icnt=0

           do i1=1,101,2

                do i2=i1,101,2

                   do i3=i2,101,2

                   icnt=icnt+1

                   y3(icnt,4)=i1**3+i2**3+i3**3

                   y3(icnt,1)=i1

                   y3(icnt,2)=i2

                   y3(icnt,3)=i3

                   enddo

                enddo

           enddo

           do 1 i=3,icnt,2

           call isprime(i,n)

           if (n.eq.0)go to 1

           ndig=log10(1.*i)+1

           dum=i

                do j=ndig-1,1,-1

                num(j+1)=dum/10**j

                dum=dum-num(j+1)*10**j

                enddo   

           num(1)=dum

           half=(ndig+1)/2

                do j=1,half

                if(num(j).ne.num(ndig+1-j))go to 1

                enddo

                do j=1,1000000

                if(y3(j,4).ne.i)go to 2

                print 3,i,y3(j,1),y3(j,2),y3(j,3)

3               format(i6, ' =',2(2x,i3,'^3    + '),2x,i3,'^3')

2               enddo

1          enddo

        end


        subroutine isprime(i,n)

        implicit none

        integer*8 i,j,k,l,m,n

        n=1

        if(i.eq.2)return

        n=0

        k=sqrt(1.*i)

           do j=2,k

           m=(1.*i)/(1.*j)

           l=m*j

           if(l.eq.i)go to 1

           enddo

        n=1

1       return

        end


Edited on October 27, 2018, 11:58 am
  Posted by Steven Lord on 2018-10-27 09:19:38

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (7)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2018 by Animus Pactum Consulting. All rights reserved. Privacy Information