Program for Centered Icosahedral Number | C ++ Program to find nth Centered icosahedral number ; Function to find Centered icosahedral number ; Formula to calculate nth Centered icosahedral number and return it into main function . ; Driver Code
#include <bits/stdc++.h> NEW_LINE using namespace std ; int centeredIcosahedralNum ( int n ) { return ( 2 * n + 1 ) * ( 5 * n * n + 5 * n + 3 ) / 3 ; } int main ( ) { int n = 10 ; cout << centeredIcosahedralNum ( n ) << endl ; n = 12 ; cout << centeredIcosahedralNum ( n ) << endl ; return 0 ; }