The lcm( Command

We're glad you came by, but you might find what you're looking for elsewhere.

TI-Basic Developer is not the site it once was. While its information on commands and other calculator features remains almost second-to-none, its forum, archives, and even hosting service, Wikidot, have been decaying for years. The calculator community would love to see what you're working on, or help you in your next coding adventure, but TI-Basic Developer is no longer the place to do it.

Instead, you should head over to Cemetech (primarily American) or TI-Planet (primarily international). Both are active, well-established forums with their own archives, chatrooms, reference material, and abundant coding tools and resources. We'll see you there, we hope.

LCM.GIF

Command Summary

Finds the least common multiple of two values.

Command Syntax

lcm(value1, value2)

Menu Location

Press:

  1. MATH to access the math menu.
  2. RIGHT to access the NUM submenu.
  3. 8 to select lcm(, or use arrows.

Calculator Compatibility

TI-83/84/+/SE

Token Size

2 bytes

Returns the least common multiple (LCM) of two nonnegative integers; lcm(a,b) is equivalent to ab/gcd(a,b). Also works on lists.

lcm(8,6)
     24
lcm({9,12},6)
     {18 12}
lcm({14,12},{6,8})
     {42 24}

Error Conditions

  • ERR:DIM MISMATCH is thrown if the arguments are two lists that don't have the same number of elements.
  • ERR:DOMAIN is thrown if the arguments aren't positive integers (or lists of positive integers) less than 1e12.

Related Commands

.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Noncommercial 2.5 License.