document.write( "Question 836111: Please help by showing me the working on this problem:\r
\n" ); document.write( "\n" ); document.write( "A brother and sister, peter and Fiona, are always thinking about numbers. On his birthday peter said \"my age is a square number \". His older sister Fiona said \"that's right, but the sum if our ages and the difference of our ages also give squared numbers\". Peter replied, \"in 3 years time, both our ages will be prime numbers\". Fiona replied\" three years ago both our ages were also prime numbers\". What are the ages of peter and Fiona now? \r
\n" ); document.write( "\n" ); document.write( "Help, I'm stuck\r
\n" ); document.write( "\n" ); document.write( "Ros1
\n" ); document.write( "

Algebra.Com's Answer #504028 by LinnW(1048)\"\" \"About 
You can put this solution on YOUR website!
set p = Peter's age
\n" ); document.write( " f = Fiona's age
\n" ); document.write( "P is a square
\n" ); document.write( "So p is one of 1,4,9,16,25,36,49,64,81,100,121,144,....
\n" ); document.write( "that is 1^2,2^2 and so forth.
\n" ); document.write( "Since ( p + 3 ) is prime let's look at possible values for ( p + 3 )
\n" ); document.write( "1 + 3 = 4 so p cannot be 1
\n" ); document.write( "4 + 3 = 7. Since 7 is prime 4 is a possibility
\n" ); document.write( "9 + 3 = 12 so p cannot be 9
\n" ); document.write( "16 + 3 = 19 so 16 is a possibility
\n" ); document.write( "25 + 3 = 28 so p cannot be 25
\n" ); document.write( "36 + 3 = 39 so since 39 is divisible by 3, p cannot be 36
\n" ); document.write( "49 + 3 = 52 so p cannot be 49
\n" ); document.write( "64 + 3 = 67. Since 67 is prime 64 is a possibility
\n" ); document.write( "100 + 3 = 103. Since 103 is prime, 100 is a possibility
\n" ); document.write( "121 + 3 = 124 so p cannot be 121
\n" ); document.write( "At this point we know p can be 4,16,64 or 100.
\n" ); document.write( "We can check larger numbers later if necessary.
\n" ); document.write( "Since p - 3 is prime let's check out 4,16,64 or 100
\n" ); document.write( "4-3 = 1 so 4 does not work
\n" ); document.write( "16-3 = 13 which is prime so 16 continues to be a condidate
\n" ); document.write( "64-3 = 61 which is prime so 64 continues to be a condidate
\n" ); document.write( "100-3 = 97 which is prime so 100 continues to be a condidate
\n" ); document.write( "At this point we know p is probably 16, 64 or 100.
\n" ); document.write( "We know (p + f) is a square so
\n" ); document.write( "(p + f) is one of 16,25,36,49,64,100,121,144,..
\n" ); document.write( "If p = 16 , f = 20 is possible since 16+20 = 36
\n" ); document.write( "16 + 49 = 65 , not a square
\n" ); document.write( "16 + 64 = 80 , not a square
\n" ); document.write( "16 + 100 = 116 , not a square
\n" ); document.write( "16 + 121 = 137 , not a square
\n" ); document.write( "Let's check further to see if 16 and 20 work.
\n" ); document.write( "We know (p-f) is a square so
\n" ); document.write( "20-16 = 4 and we are good on this requirement.
\n" ); document.write( "Three years from know each will be prime.
\n" ); document.write( "20+3 = 23 so this checks
\n" ); document.write( "16+3 = 19 so this works
\n" ); document.write( "Three years ago needs to be prime
\n" ); document.write( "20-3 = 17 so this checks
\n" ); document.write( "16-3 = 13 so this checks
\n" ); document.write( "We know that p = 16 and f = 20 works.
\n" ); document.write( "So Peter can be 16 and Fiona 20 and we meet all of the requirements.\r
\n" ); document.write( "\n" ); document.write( "
\n" ); document.write( "
\n" );