Upload
davidreyes
View
5
Download
0
Embed Size (px)
DESCRIPTION
A little presentation about two codes for integer sequences.
Citation preview
Integer sequencesDavid Reyes Alvarado
Electronical Engineering
Triangular numbers
Triangular numbers, as shown in the image, are a pattern of numbers that
form equilateral triangles. Each subsequent number in the sequence adds a
new row of dots to the triangle.[1]
[1] Taken from Study.com, (2015). What Are Triangular Numbers? - Definition, Formula & Examples | Study.com. [online] Available
at: http://study.com/academy/lesson/what-are-triangular-numbers-definition-formula-examples.html [Accessed 30 Sep. 2015].
Figure 1. Graphical representation of triangular numbers.
Triangular numbers
Figure 2. Code for triangular numbers.
Triangular numbers
Figure 3. Graphical representation for nth triangular number.
Deficient numbers
A deficient number is a number n for which the sum of divisors (n)
Dificient numbers
Figure 4. Code for deficient numbers (Part 1).
Deficient numbers
Figure 5. Code for deficient numbers (Part 2).
Deficient numbers
Figure 5. (a) Input the nth term to find. (b) Graphical representation for growing tendency of deficient numbers
(a)
(b)
Any question?
References
Sojamo.de, (2015). Javadocs: controlP5. [online] Available at:
http://www.sojamo.de/libraries/controlP5/reference/index.html [Accessed
30 Sep. 2015].
Thank you so much!