ponderThis201004b.frink

Download or view ponderThis201004b.frink in plain text format

a = int[1.09e+124]
a = 10964973879145266684597918386961206640359744239118799335560543882943204057285999161085137407678295834997000000000000000000000
//a = 10964980000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
//a = 11382975651657608000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
//a = 25000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000


dd = 0
do
{
   n = hex[a]
   astr= "$a"
   atstr = left[astr, length[astr]-21]
   if length[atstr] < length[n]
   {
      a = a * 2
      dd = 1
   } else
   {
      
      ah = parseInt[atstr, 16]
      diff = ah-a

      println[a]
      println[n]
      println[atstr]
      println[(1.0) diff]
      dd = diff div 2
      if (dd != 0)
         a = nextPrime[a + dd+752]
   }
} while dd != 0

if (dd == 0)
{
   println["SOLUTION:"]
   println[a]
   println[hex[a]]
//   aa = nextPrime[a]
}


Download or view ponderThis201004b.frink in plain text format


This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen was born 19346 days, 22 hours, 23 minutes ago.