HomeGoogle DocsSpreadsheetTriangular Numbers in Google Sheets (1, 3, 6, 10 Pattern)

Triangular Numbers in Google Sheets (1, 3, 6, 10 Pattern)

Before we explore how to generate triangular numbers in Google Sheets, it’s helpful to understand what they are. Triangular numbers form a sequence in which each number is the sum of all natural numbers up to that point. The sequence starts 1, 3, 6, 10, 15, 21, and continues indefinitely. For example, the 4th triangular number is 10, calculated as 1 + 2 + 3 + 4.

In Google Sheets, you don’t need to calculate each number manually. Using simple formulas, you can automatically generate the entire triangular number series in a column. This makes it easy to create lists, explore number patterns, or use them for further calculations.

In this tutorial, we’ll cover two effective methods for generating triangular numbers in Google Sheets:

  1. Using the nth triangular number formula
  2. Using the SCAN function to create a running total

Both approaches are dynamic, allowing you to adjust the sequence length without rewriting formulas, making your spreadsheet more flexible and efficient.

Triangular Numbers Using the nth Formula

The nth triangular number is calculated using the well-known formula:

Tn = n(n+1)/2

For example:

  • =1*(1+1)/2 → returns 1 (1st triangular number)
  • =10*(10+1)/2 → returns 55 (10th triangular number)

To generate a sequence of triangular numbers from 1st to 10th in Google Sheets, you can use SEQUENCE with ARRAYFORMULA:

=ARRAYFORMULA(SEQUENCE(10) * (SEQUENCE(10, 1, 2)) / 2)

Replace 10 with any number n to generate n triangular numbers.

nth Formula Explained

  • SEQUENCE(10) → generates numbers 1 through 10 in a column (n).
  • SEQUENCE(10, 1, 2) → generates numbers 2 through 11 in a column (n+1).
  • Multiplying them together gives n × (n+1).
  • Dividing by 2 applies the triangular number formula.
  • Wrapping in ARRAYFORMULA lets the calculation spill automatically down the column.

This produces the sequence:

Triangular numbers 1, 3, 6, 10, … in Google Sheets generated with a formula

Triangular Numbers Using SCAN (Running Total)

Triangular numbers are also the running total of the natural numbers sequence. In Google Sheets, you can generate this using the SCAN function:

=SCAN(0, SEQUENCE(10), LAMBDA(acc, val, acc+val))
  • SEQUENCE(10) → generates numbers 1 through 10.
  • SCAN(0, ..., LAMBDA(acc, val, acc+val)) → computes a running total starting from 0.
  • The result is the triangular number series: 1, 3, 6, 10…

Replace 10 with any number n to generate the first n triangular numbers dynamically.

Resources

Prashanth K V
Prashanth K V
Your Trusted Google Sheets and Excel Expert Prashanth K V is a Diamond Product Expert in Google Sheets, officially recognized by Google for his contributions to the Docs Editors Help Community and featured in the Google Product Experts Directory. Explore his blog to learn advanced formulas, automation tips, and problem-solving techniques to elevate your spreadsheet skills.

Editor's Choice

Consolidate Data in Google Sheets (Even When Columns Don’t Match)

Consolidating data from multiple sheets is a common task...

Google Sheets Joins with Duplicate IDs (Left, Right, Inner & Full)

You can use Left, Right, Inner, and Full Joins...

40+ Free Google Sheets Templates (Premium & Fully Automated)

Looking for premium Google Sheets templates for free? You’re...

More like this

Google Sheets Document Expiry Tracker Template (Free Download)

Missing your visa renewal, vehicle insurance renewal, emission certificate expiry, domain renewal, or scheduled...

Google Sheets Habit Tracker Template (Free & Automated)

Want to monitor your habits and track your progress over a month or across...

How to Sort a Pivot Table by Value in Google Sheets

Google Sheets lets you sort Pivot Tables by row fields, column fields, or summarized...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.