Program to find the Nth icosikaienneagonal number in C

Updated

Given a number N, the task is to find Nth icosikaienneagonal number.

An icosikaienneagonal number is class of figurate number. It has 29 – sided polygon called icosikaienneagon. The N-th icosikaienneagonal number count’s the 29 number of dots and all others dots are surrounding with a common sharing corner and make a pattern. The first few icosikaienneagonal numbers are 1, 29, 84, 166 …

Examples :

Input : N = 2 Output : 29 Explanation : The second icosikaienneagonal number is 29. Input : N = 3 Output : 84

Approach :

The N-th icosikaienneagonal number is given by the formula:

Tn = (27n^2 - 25n)/2

Implementation :

C/C++

// C program for above approach
#include <stdio.h>
#include <stdlib.h>

// Finding the nth 	icosikaienneagonal Number
int 	icosikaienneagonalNum(int n)
{
    return (27 * n * n - 25 * n) / 2; 
}

// Driver program to test above function
int main()
{
    int n = 3;
    printf("3rd icosikaienneagonal Number is = %d",
                             	icosikaienneagonalNum(n));

    return 0;
}

Output :

3rd icosikaienneagonal Number is =  84
Comment
Next tutorial
Mithlesh Upadhyay Published 7 Nov 2026 · 1 min read

Mithlesh Upadhyay is a Computer Science and AI expert from Madhya Pradesh with strong academic background (BE in CSE and M.Tech in AI) and over six years of experience in technical content development. He has contributed tech articles, led teams, and worked in Full Stack Development and Data Science. He founded the w3colleges.org portal for learning resources.

Related tutorials