Wolfram Research

Function Repository Resource:

MultiplicationTable

Source Notebook

Generate a multiplication table for a range of integers, optionally using modular arithmetic

Contributed by: Paco Jain (Wolfram Research)

ResourceFunction["MultiplicationTable"][n]

produces the multiplication tables for positive integers less than n.

ResourceFunction["MultiplicationTable"][{n, m}]

produces the multiplication tables for positive integers between n and m.

Details and Options

ResourceFunction["MultiplicationTable"] returns a Grid expression.
MultiplicationTable takes Modulus as an option, which specifies that arithmetic should be performed with the indicated modulus. The default value of 0 indicates ordinary arithmetic.

Examples

Basic Examples

Produce a basic multiplication table:

In[1]:=
ResourceFunction["MultiplicationTable"][12]
Out[1]=

Produce a multiplication table across a specific range of values:

In[2]:=
ResourceFunction["MultiplicationTable"][{5, 9}]
Out[2]=

Options

Produce a multiplication table using modular arithmetic:

In[3]:=
ResourceFunction["MultiplicationTable"][{2, 10}, Modulus -> 4]
Out[3]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Resource History

License Information