Alcuin sequence is the expansion of
This series has significant importance as
- Alcuin Sequence a(n) is the number of triangles with integer sides and the perimeter of the triangle is n.
- Alcuin Sequence a(n) is the number of triangles with distinct integer sides and the perimeter of the triangle is n+6.
The Alcuin sequence is as follows:
0, 0, 1, 0, 1, 1, 2, 1, 3, 2
Input: n = 10 Output: 0, 0, 1, 0, 1, 1, 2, 1, 3, 2 Input: n = 15 Output:0, 0, 1, 0, 1, 1, 2, 1, 3, 2, 4, 3, 5, 4, 7,
- Find the nth term of the Alcuin sequence using
a(n) = round(n^2/12) – floor(n/4)*floor((n+2)/4)
- Find out the ith term and display it.
Below is the implementation of the above approach:
0, 0, 1, 0, 1, 1, 2, 1, 3, 2, 4, 3, 5, 4, 7,
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Look-and-Say Sequence
- Sum of the sequence 2, 22, 222, .........
- k-th number in the Odd-Even sequence
- Connell Sequence
- Aronson's Sequence
- Gijswijt's Sequence
- Gould's Sequence
- Find F(n) when F(i) and F(j) of a sequence are given
- Golomb sequence
- Aliquot Sequence
- Padovan Sequence
- Juggler Sequence
- Beatty sequence
- Sylvester's sequence
- Farey Sequence
- Recaman's sequence
- Increasing sequence with given GCD
- Smarandache-Wellin Sequence
- G-Fact 21 | Collatz Sequence
- Program to find sum of the given sequence
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.