Centered Dodecagonal Number | Java Program to find nth centered dodecagonal number ; Function to calculate centered dodecagonal number ; Formula to calculate nth centered dodecagonal number ; Driver Code
import java . io . * ; class GFG { static long centeredDodecagonal ( long n ) { return 6 * n * ( n - 1 ) + 1 ; } public static void main ( String [ ] args ) { long n = 2 ; System . out . println ( centeredDodecagonal ( n ) ) ; n = 9 ; System . out . println ( centeredDodecagonal ( n ) ) ; } }