Centered heptagonal number | C # program to find n - th Centered heptagonal number ; Function to find Centered heptagonal number ; Formula to calculate nth Centered heptagonal number ; Driver Code
using System ; class GFG { static long centered_heptagonal_num ( long n ) { return ( 7 * n * n - 7 * n + 2 ) / 2 ; } public static void Main ( ) { long n = 5 ; Console . WriteLine ( n + " th ▁ Centered ▁ " + " heptagonal ▁ number ▁ : ▁ " + centered_heptagonal_num ( n ) ) ; } }