Floyd's triangle

1

Floyd's triangle is a triangular array of natural numbers used in computer science education. It is named after Robert Floyd. It is defined by filling the rows of the triangle with consecutive numbers, starting with a 1 in the top left corner: The problem of writing a computer program to produce this triangle has been frequently used as an exercise or example for beginning computer programmers, covering the concepts of text formatting and simple loop constructs.

Properties

n(n2 + 1)/2 , the constant of an n × n magic square. 1 = 1 = T(T(1)) 1 = 6 = T(T(2)) 2 + 3 1 2 + 3 = 21 = T(T(3)) 4 + 5 + 6

This article is derived from Wikipedia and licensed under CC BY-SA 4.0. View the original article.

Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc.
Bliptext is not affiliated with or endorsed by Wikipedia or the Wikimedia Foundation.

Edit article