Enneadecagonal number | Java program to find nth Enneadecagonal number ; Function to calculate Enneadecagonal number ; Formula for finding nth Enneadecagonal number ; Driver Code
import java . io . * ; class GFG { static int nthEnneadecagonal ( int n ) { return ( 17 * n * n - 15 * n ) / 2 ; } public static void main ( String [ ] args ) { int n = 6 ; System . out . print ( n + " th ▁ Enneadecagonal ▁ number ▁ : " ) ; System . out . println ( nthEnneadecagonal ( n ) ) ; } }