Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Help needed: calculating a grid layout for a given number...?

  • 04-11-2018 07:25PM
    #1
    Registered Users, Registered Users 2 Posts: 3,445 ✭✭✭


    Is there a way of working out if a given number can be can be expressed as a grid?

    E.g. 100 can be expressed as 10 x 10, 5 x 20, 2 x 50, whatever...

    So, if I have a much larger number, is there a way of seeing if it can be expressed as a grid, without any gaps, if you see what I mean?

    E.g. 2578, 2738, whatever...

    Thanks.

    D.


Comments

  • Closed Accounts Posts: 4,097 ✭✭✭amcalester


    Would all numbers not be gridable? Even prime numbers could be 1 x N where N is the prime number.

    Conversely all numbers bar prime numbers have more than 1 grid option.


  • Registered Users, Registered Users 2 Posts: 3,445 ✭✭✭Dinarius


    amcalester wrote: »
    Would all numbers not be gridable? Even prime numbers could be 1 x N where N is the prime number.

    Conversely all numbers bar prime numbers have more than 1 grid option.

    Thanks.

    So, let’s say 2738. Is that a prime number? Can it be expressed in any grid formation?

    Thanks.

    D.


  • Closed Accounts Posts: 4,097 ✭✭✭amcalester


    Dinarius wrote: »
    Thanks.

    So, let’s say 2738. Is that a prime number? Can it be expressed in any grid formation?

    Thanks.

    D.

    2738 is an even number so isn’t a prime, it can be

    2 x 1369
    37 x 74

    And then the opposite

    1369 x 2
    74 x 37

    You just want the factors of the number in question and those are your grids.


  • Registered Users, Registered Users 2 Posts: 3,445 ✭✭✭Dinarius


    amcalester wrote: »
    2738 is an even number so isn’t a prime, it can be

    2 x 1369
    37 x 74

    And then the opposite

    1369 x 2
    74 x 37

    You just want the factors of the number in question and those are your grids.

    Brilliant!

    So, apart from 74 x 37, what other grid options do I have?

    Really grateful for this.

    Thanks!

    D.

    Ps. 2 x 1369 is way to elongated. 74 x 37 is much closer to the kind of rectangle I want.


  • Closed Accounts Posts: 4,097 ✭✭✭amcalester


    Dinarius wrote: »
    Brilliant!

    So, apart from 74 x 37, what other grid options do I have?

    Really grateful for this.

    Thanks!

    D.

    Ps. 2 x 1369 is way to elongated. 74 x 37 is much closer to the kind of rectangle I want.


    For 2738? None, those are the only factors. No other combination of 2 whole numbers can be multiplied to give you 2738.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 3,445 ✭✭✭Dinarius


    That sorts it.

    Many thanks!

    D.


Advertisement