This is a follow-on from a similar question here. If I already have a table of data, say
table1 = {{0, 0, 0, 0, 0, 0},
{0, 1, 2, 3, 4, 5},
{0, 2, 4, 6, 8, 10},
{0, 3, 6, 9, 12, 15},
{0, 4, 8, 12, 16, 20},
{0, 5, 10, 15, 20, 25},
{0, 6, 12, 18, 24, 30},
{0, 7, 14, 21, 28, 35},
{0, 8, 16, 24, 32, 40},
{0, 9, 18, 27, 36, 45},
{0, 10, 20, 30, 40, 50},
{0, 11, 22, 33, 44, 55},
{0, 12, 24, 36, 48, 60},
{0, 13, 26, 39, 52, 65},
{0, 14, 28, 42, 56, 70},
{0, 15, 30, 45, 60, 75}}
and I want to present this in TableForm
with the rows whose row numbers are prime (i.e., rows 2,3,5...) in bold, how do I do this by applying functions to table1
? Perhaps some combination of If, Length, Range and PrimeQ?
Obviously in the above case the table is small enough to do it manually, but I want to be able to do this with any arbitrary pre-existing table of data.