Squares and Cubes Table
| Constraint | What it enforces | Example |
|---|---|---|
| PRIMARY KEY | Uniquely identifies each row; NOT NULL + UNIQUE automatically | id SERIAL PRIMARY KEY |
| FOREIGN KEY | Value must exist in the referenced table\u2019s column | user_id INT REFERENCES users(id) |
| UNIQUE | No duplicate values in the column (NULLs allowed in PostgreSQL) | email VARCHAR(255) UNIQUE |
| CHECK | Boolean expression must be true for every row | price DECIMAL CHECK (price >= 0) |
| NOT NULL | Column must have a value (no NULL) | name TEXT NOT NULL |
| DEFAULT | Value used when none is provided | created_at TIMESTAMPTZ DEFAULT now() |
| EXCLUDE | Rows must not conflict using the specified operator | EXCLUDE USING gist (room WITH =, during WITH &&) |
Squares and cubes are the multiplication facts school skips after 12 - yet they decide tile areas, box volumes and why a 10% raise then a 10% cut leaves you behind. This table runs the full 1-100 range as exact integers, and the calculator adds the roots to six decimals so you can see which numbers open back up cleanly.
Everything here is computed, not transcribed: the table cannot be wrong by a typo, and the tool handles any number the table does not.
How to use
- Type any number for its square, cube, square root and cube root at once; chips jump to 12, 25, 64 and 100.
- Scan the table column for patterns: squares end only in 0, 1, 4, 5, 6 or 9 - never 2, 3, 7 or 8.
- Use √ on a perfect square to sanity-check the table row: √144 = 12, round trip closed.
Frequently asked questions
What is the largest square in the table?
100² = 10,000 and 100³ = 1,000,000 - one million is the smallest cube with seven digits, which is why "six figures" of cube makes a millionaire joke work. The calculator extends past 100 for any n.
Which numbers have exact cube roots?
The perfect cubes: 1, 8, 27, 64, 125, 216, 343, 512, 729, 1000 - ten of them below 1000. Everything else gets a decimal; the calculator shows six places so 2∛ style rounding is visible, not hidden.
Why do squares never end in 2, 3, 7 or 8?
The last digit of n² depends only on the last digit of n, and squaring 0-9 yields only 0, 1, 4, 5, 6, 9. It is the fastest mental check that a number cannot be a perfect square - 15,392 fails before any dividing starts.
How fast does cubing grow?
Fast: 2³ = 8 is 8 times 1, but 10³ = 1000 is 10 times 100. Doubling the side of a box multiplies its volume by 8 - the reason small animals lose heat fast and whales do not, and why the 64 chip above is not just a bigger 32.