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,
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Sum of the sequence 2, 22, 222, .........
- Look-and-Say Sequence
- Increasing sequence with given GCD
- Beatty sequence
- k-th number in the Odd-Even sequence
- Connell Sequence
- Gould's Sequence
- Aronson's Sequence
- Golomb sequence
- Sylvester's sequence
- Farey Sequence
- Recaman's sequence
- Juggler Sequence
- Padovan Sequence
- Aliquot Sequence
- Find F(n) when F(i) and F(j) of a sequence are given
- Gijswijt's Sequence
- Print the two possible permutations from a given sequence
- Ulam Number 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 email@example.com. 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.