Softpedia
 


SCRIPTS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Peardrop CMS 0.2.3
  • CommaFeed 0.0.1
  • Squash
  • Pick-a-Color 1.1.5
  • MVIS Security Center 1....
  • EasyZoom 1.0.3
  • jQueryGantt
  • IMDBPHP 2.1.8
  • Dynamic WordPress Form ...
  • PathFinding.js 0.4.1
  • Home > Scripts > Scientific/Engineering > Mathematics

    Find numbers which can be expressed as Sum

    download button


    Downloads: 359  Tell us about an update
    User Rating:
    Rated by:
    Fair (2.5/5)
    19 user(s)
    Developer:

    Website:

    License / Price:

    Platforms:

    Databases:

    Language:

    Last Updated:

    Category:
    Sundar Krishnan | More scripts
    www.mathworks.com
    Freeware 

    Windows / Linux / Mac OS / BSD / Solaris
    N/A
    Matlab
    August 27th, 2007, 12:43 GMT
    C: \ Scientific/Engineering \ Mathematics

     Read user reviews (0)  Refer to a friend  Subscribe

    Find numbers which can be expressed as Sum description

    Find numbers which can be expressed as Sum of Squares of Positive Integers - Suite of 4 fns to find 2 groups of Positive Integers

    First, some examples :
    17 * 29 * 41 * 149 * 113 = 340326281
    = 2984^2 18205^2 = 18220^2 2891^2

    509 * 853 * 769 = 333882113
    = 11528^2 14177^2 = 18272^2 127^2

    The Main programme is the subfunction Test_Random_2_Squares within the function : Runs_Of_Test_Random_2_Squares_1.m which tries to find 2 sets of arrays of positive integers such that the corresponding sums of squares of the numbers in the 2 arrays equals the product of r no of Prime Factors.

    The function : find_the_2_Squares_from_the_Sum ( Sum ) forms the heart of this suite, which can also be independently used.

    Whereas, currently (Aug 2005), the top function : Runs_Of_Test_Random_2_Squares_1.m
    deals only with prime factors of the form (4*n 1), the heart-function : fnd_the_2_Squares_from_the_Sum.m can still be independently used to find sum of squares - even if the factors include primes of type (4*n-1), or even 2.

    The various steps of the subfunction Test_Random_2_Squares.m are :

    1) This overall pgm first calls Prime_Fctrs_Of_Sum_Of_2_Sqrs(N)
    to obtain the list of primes which are <= N, and which are of the form (4n 1).

    2) Next, it randomly chooses "r" nos from the output primes_N_4nPlus1 of the above call.

    3) Next, it calls [ Match_Rnded_Array_1, Match_Rnded_Array_2 ] =
    find_the_2_Squares_from_the_Sum(Sum) ;
    to get the 2 sets of arrays.



    TAGS:

    Sum Squares | Positive Integers | matlab mathematics | Sum | Squares | Positive

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM