Skip to main content

Timeline for Table of numbers and their divisors

Current License: CC BY-SA 4.0

7 events
when toggle format what by license comment
Mar 8, 2019 at 11:24 comment added kglr ... so i had to use Row around the inner lists. The example in your comment can be done using TableForm[Transpose[{Range[25], Row[Divisors[#]] & /@ Range[25]}], TableHeadings -> {Automatic, {"n", "divisors[n]"}}, TableAlignments -> Center].
Mar 8, 2019 at 11:24 vote accept Richard Burke-Ward
Mar 8, 2019 at 11:23 comment added kglr @Richard, table is a 3X2 matrix of numbers as in your first example. Map[Divisors, table, {-1}] gives the divisors of each entry in that matrix. I wrapped each list of divisors with Row[..., " "] so that each divisor list is displayed horizontally. A simpler form using the options TableDirections is TableForm[Join[table, Map[Divisors, table, {-1}], 2], TableHeadings -> {{"1", "2", "3"}, {"m", "n", "divisors[m]", "divisors[n]"}, None}, TableAlignments -> Center, TableDirections -> {Column, Row, Row}] but, due to a glitch/bug it doesn't display the dividers.
Mar 8, 2019 at 11:10 comment added Richard Burke-Ward Many thanks @kglr. I'm struggling to incorporate this solution into other forms of table (mainly because I don't understand what you did!) I'd also like to create a table that lists n from 1 to 25 in one column, and Divisors[n] in the second column, formatted as you did in your answer above.
Mar 8, 2019 at 10:56 history edited kglr CC BY-SA 4.0
added 87 characters in body
Mar 8, 2019 at 10:56 vote accept Richard Burke-Ward
Mar 8, 2019 at 11:07
Mar 8, 2019 at 10:42 history answered kglr CC BY-SA 4.0