Centered Pentadecagonal Number | C # Program to find nth centered pentadecagonal number ; centered pentadecagonal function ; Formula to calculate nth centered pentadecagonal number ; Driver Code
using System ; class GFG { static long center_pentadecagonal_num ( long n ) { return ( 15 * n * n - 15 * n + 2 ) / 2 ; } static public void Main ( ) { long n = 3 ; Console . Write ( n + " th ▁ number ▁ : ▁ " ) ; Console . WriteLine ( center_pentadecagonal_num ( n ) ) ; n = 10 ; Console . Write ( n + " th ▁ number ▁ : ▁ " ) ; Console . WriteLine ( center_pentadecagonal_num ( n ) ) ; } }