Given a number n, find the nth Dodecagonal number.Dodecagonal numbers represent Dodecagonal (A polygon with 12 sides).
Some of the Dodecagonal numbers are:
1, 12, 33, 64, 105, 156, 217, 288, 369, 460, 561, 672, 793, 924………………………..
Input : n = 4 Output : 64 Input : n = 9 Output : 369
Formula of nth Term of Dodecagonal number :
n-th Dodecagonal number = 5n2 - 4n
Below is the implementation for nth Dodecagonal Number:
- Centered Dodecagonal Number
- Count number of trailing zeros in Binary representation of a number using Bitset
- Count number of triplets with product equal to given number with duplicates allowed
- Find minimum number to be divided to make a number a perfect square
- Number of times the largest perfect square number can be subtracted from N
- Given number of matches played, find number of teams in tournament
- Find the number of positive integers less than or equal to N that have an odd number of digits
- Number of possible permutations when absolute difference between number of elements to the right and left are given
- Number of ways to split a binary number such that every part is divisible by 2
- Querying maximum number of divisors that a number in a given range has
- Find the number of integers x in range (1,N) for which x and x+1 have same number of divisors
- Queries on sum of odd number digit sums of all the factors of a number
- Build Lowest Number by Removing n digits from a given number
- Count Number of animals in a zoo from given number of head and legs
- Print a number strictly less than a given number such that all its digits are distinct.
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.