Preprint
Article

This version is not peer-reviewed.

On the Prime Numbers and Some Graphs Related to the Set of Number of Diagonals of Regular Polygons

Submitted:

17 July 2025

Posted:

18 July 2025

You are already at the latest version

Abstract
In this article‎, ‎we will discuss the relationship between prime numbers and diagonals of polygons‎. ‎In addition‎, ‎we will introduce and investigate two graphs related to the the set of number of diagonals of regular polygons‎.
Keywords: 
;  ;  

1. Introduction

Prime numbers are key in number theory and they have always remained a matter fascination to the mathematicians, and many scientific and technical communities.
A polygon is a flat 2-dimensional ( 2 D ) shape made of straight lines. The sides connect to form a closed shape. Diagonals of a polygon are the lines that connect the alternate vertices of the polygon. The number of diagonals of a polygon with n vertices is given by n ( n 3 ) 2 .
A graph G is defined as the pair ( V ( G ) , E ( G ) ) , where V ( G ) is the set of vertices of G and E ( G ) is the set of edges of G. For two distinct vertices a and b of V ( G ) , the notation a b means that a and b are adjacent. A graph G is said to be complete if a b for all distinct a , b V ( G ) , and G is said to be empty if E ( G ) = . Note by this definition that a graph may be empty even if V ( G ) . An empty graph could also be described as totally disconnected. If | V ( G ) | 2 , a path from a to b is a series of adjacent vertices a v 1 v 2 . . . v n b . The length of a path is the number of edges it contains. A cycle is a path that begins and ends at the same vertex in which no edge is repeated, and all vertices other than the starting and ending vertex are distinct. If a graph G has a cycle, the girth of G (notated g ( G ) ) is defined as the length of the shortest cycle of G; otherwise, g ( G ) = . A graph G is connected if for every pair of distinct vertices a , b V ( G ) , there exists a path from a to b. If there is a path from a to b with a , b V ( G ) , then the distance from a to b is the length of the shortest path from a to b and is denoted by d ( a , b ) . If there is not a path between a and b, d ( a , b ) = . The diameter of G is diam ( G ) = S u p { d ( a , b ) | a , b V ( G ) } . A graph is said to be planar if it can be drawn in the plane so that its edges intersect only at their ends [1].
It is well known that we can translate some properties of number theory to graph theory language and then the geometric properties of graphs help us explore some interesting results in number theory. In this regard, we will discuss the relationship between prime numbers and diagonals of polygons. In addition, we will introduce and investigate two graphs related to the the set of number of diagonals of regular polygons.

2. Main Results

Notation and Remark 2.1. We know that the number of diagonals in n-sided polygon D n = n ( n 3 ) / 2 . Now, consider the following set that is the set of number of diagonals in n-gon for n = 4 , 5 , 6 , .
D = { 2 , 5 , 9 , 14 , 20 , 27 , 35 , 44 , 54 , 65 , 77 , 90 , 104 , 119 , 135 , 152 , . . . } .
Set D n = { f i r s t n e l e m e n t s o f D } . For example,
D 41 = { 2 , 5 , 9 , 14 , 20 , 27 , 35 , 44 , 54 , 65 , 77 , 90 , 104 , 119 , 135 ,
152 , 170 , 189 , 209 , 230 , 252 , 275 , 299 , 324 , 350 , 377 , 405 , 434 , 464 , 495 , 527 , 560 ,
594 , 629 , 665 , 702 , 720 , 779 } .
Now, set
F = { ( 2 , 5 ) , ( 9 , 14 ) , ( 20 , 27 ) , ( 35 , 44 ) , ( 54 , 65 ) , ( 77 , 90 ) , ( 104 , 119 ) , ( 135 , 152 ) ,
( 170 , 189 ) , ( 209 , 230 ) , ( 252 , 275 ) , ( 299 , 324 ) , ( 350 , 377 ) , ( 405 , 434 ) , ( 464 , 495 ) ,
( 527 , 560 ) , ( 594 , 629 ) , ( 665 , 702 ) , ( 720 , 779 ) , . . . } .
Then for ( x , y ) { ( 2 , 5 ) , ( 9 , 14 ) , ( 20 , 27 ) , ( 35 , 44 ) , ( 54 , 65 ) , ( 77 , 90 ) , ( 104 , 119 ) } , we have x + y is a prime number. But 135 + 152 = 287 is not a prime number.
Definition 2.2. 
The graph related to the set of number of diagonals of regular polygons, denoted by Γ + ( D n ) , is an undirected simple graph whose vertices are D n and two distinct vertices x and y are adjacent if and only if x + y is a prime number.
Example 2.3. 
From the Figure 1, the following can be obtained for the graph Γ + ( D 9 ) :
(a)
The prime numbers introduced form the graph Γ + ( D 9 ) are the following set:
{ 7 , 11 , 19 , 23 , 29 , 37 , 41 , 53 , 59 , 67 , 71 , 79 , 89 } .
(b)
g ( Γ + ( D 9 ) ) = 4 .
(c)
d i a m ( Γ + ( D 9 ) ) = 3 .
(d)
Γ + ( D 9 ) is a connected graph.
Recall that a vertex with degree zero is called an isolated vertex.
Theorem 2.4. 
Let n N . Then Γ + ( D n ) has no isolated vertex if for each k N there is a prime number p such that 9 4 k 2 + 12 k + 8 p is a square odd number.
Proof. 
Assume that y Γ + ( D n ) . Then y = k ( k 3 ) 2 for some k N . To see that Γ + ( D n ) has no isolated vertex, we need to find t N such that y is adjacent to x : = t ( t 3 ) 2 . That is x + y is a prime number p, say. So p = t ( t 3 ) 2 + k ( k 3 ) 2 . It follows that t 2 3 t + k 2 3 k 2 p = 0 . Set Δ = ( 3 ) 2 4 ( 1 ) ( k 2 3 k 2 p ) = 9 4 k 2 + 12 k + 8 p . Then t = 3 + Δ 2 or t = 3 Δ 2 . Therefore, t N if we have that Δ = 9 4 k 2 + 12 k + 8 p is a square odd number. □
Theorem 2.5. 
Γ + ( D n ) is a planar graph for each n 9 .
Proof. 
This follows from the figure of the graph Γ + ( D 9 ) . □
Example 2.6. 
We can deduce form the Figure 2 (that show all edges of Γ + ( D 17 ) but some vertex are repeated) that the prime numbers introduced form the graph Γ + ( D 17 ) are the following set:
{ 7 , 11 , 19 , 23 , 29 , 37 , 41 , 53 , 59 , 67 , 71 , 79 , 89 , 97 , 109 , 113 , 119 , 131 , 139 , 163 , 167 , 178 , 223 } .
In fact, these prime number are with the form n 2 + k 2 3 ( k + n ) 2 for some positive integer n , k .
Example 2.7. 
We can deduce form the Figure 3 that (in fact, the Figure 3 is a some of the shape of the graph Γ + ( D 17 ) ) the graph Γ + ( D n ) is a connected graph for each n 17 .
Theorem 2.8. 
Let p be a prime number. Then P can be written as the difference of the number of diagonals of
(a)
p + 1 -gon and p + 2 -gon, i.e. every prime number can be written as the difference of the diagonals of two consecutive polygons.
(b)
p + 1 2 -gon and p + 5 2 -gon, where P 3 .
Proof. (a) Set n = p + 1 . Then
p = p + 1 1 = n 1 = 2 n 2 2 = n 2 n 2 n 2 + 3 n 2 =
( n + 1 ) ( n + 1 3 ) 2 n ( n 3 ) 2 .
Thus p is a difference of the diagonals of n-gon and n + 1 -gon.
(b) This follows from the fact that the number of diagonals of p + 5 2 -gon is p 2 + 4 p 5 8 and the number of diagonals of p + 1 2 -gon is p 2 4 p 5 8 . □
Example 2.9. 
Consider F 41 (the subset of F in Notation and Remark 2.1) that is an array of set of the number of diagonals for n = 4 , 5 , , 41 , where the pairs marked in red do not have a prime difference.
F 41 = { ( 2 , 5 ) , ( 9 , 14 ) , ( 20 , 27 ) , ( 35 , 44 ) , ( 54 , 65 ) , ( 77 , 90 ) , ( 104 , 119 ) , ( 135 , 152 ) ,
( 170 , 189 ) , ( 209 , 230 ) , ( 252 , 275 ) , ( 299 , 324 ) , ( 350 , 377 ) , ( 405 , 434 ) , ( 464 , 495 ) ,
( 527 , 560 ) , ( 594 , 629 ) , ( 665 , 702 ) , ( 720 , 779 ) } .
Then the set of prime numbers that is generated by 5 2 = 3 , 27 20 = 7 , …, 702 665 = 37 is as follows:
P 41 = { 3 , 7 , 11 , 13 , 17 , 19 , 23 , 29 , 31 , 37 } .
In fact, the elements of P 41 are the prime numbers with the form n 1 for n = 4 , 8 , 12 , 14 , 18 , 20 , 24 , 30 , 32 , 38 . Continuing this way, we can create an infinite set of prime numbers P n with this form.
Example 2.10. 
Consider F 41 (the subset of F in Notation and Remark 2.1) that is an array of set of the number of diagonals for n = 4 , 5 , , 41 , where the pairs whose sum is not a prime number are highlighted in blue.
F 41 = { ( 2 , 5 ) , ( 9 , 14 ) , ( 20 , 27 ) , ( 35 , 44 ) , ( 54 , 65 ) , ( 77 , 90 ) , ( 104 , 119 ) , ( 135 , 152 ) ,
( 170 , 189 ) , ( 209 , 230 ) , ( 252 , 275 ) , ( 299 , 324 ) , ( 350 , 377 ) , ( 405 , 434 ) , ( 464 , 495 ) ,
( 527 , 560 ) , ( 594 , 629 ) , ( 665 , 702 ) , ( 720 , 779 ) } .
Then the set of prime numbers that is generated by 5 + 2 = 7 , 9 + 14 = 23 , …, 702 + 665 = 1367 is as follows:
P 41 = { 7 , 23 , 47 , 79 , 119 , 167 , 223 , 359 , 439 , 727 , 839 , 1097 , 1223 , 1367 } .
In fact, the elements of P 41 are the prime numbers with the form n 2 2 n 1 for n = 4, 6, 8, 10, 12, 14, 16, 20, 22, 28, 30, 34, 36, 38. Continuing this way, we can create an infinite set of prime numbers P n with this form.
Definition 2.11. 
The another graph related to the set of number of diagonals of regular polygons, denoted by Γ ( D n ) , is an undirected simple graph whose vertices are D n and two distinct vertices x and y are adjacent if and only if x y is a prime number.
Theorem 2.12. 
Let n N . Then Γ ( D n ) has no isolated vertex if for each k N there is a prime number p such that 9 + 4 k 2 12 k + 8 p is a square odd number.
Proof. 
Assume that y Γ ( D n ) . Then y = k ( k 3 ) 2 for some k N . To see that Γ ( D n ) has no isolated vertex, we need to find t N such that y is adjacent to x : = t ( t 3 ) 2 . That is x y is a prime number p, say. So p = t ( t 3 ) 2 k ( k 3 ) 2 . It follows that t 2 3 t k 2 + 3 k 2 p = 0 . Set Δ = ( 3 ) 2 4 ( 1 ) ( k 2 + 3 k 2 p ) = 9 + 4 k 2 12 k + 8 p . Then t = 3 + Δ 2 or t = 3 Δ 2 . Therefore, t N if we have that Δ = 9 4 k 2 + 12 k + 8 p is a square odd number. □
Corollary 2.13. 
If x = t ( t 3 ) 2 Γ ( D n ) and y = k ( k 3 ) 2 Γ ( D n ) such that k 1 is a prime number, then x is adjacent to y.
Proof. 
Set p = k 1 . By using the proof of Theorem 2.12, we get that Δ = 9 + 4 k 2 12 k + 8 p = ( 2 k 1 ) 2 . Now, the result follows from Theorem 2.12. □
Example 2.14. 
We can see that in the Figure 4 that Γ ( D n ) has no cycle for e n 37 . The prime numbers introduced form the graph Γ ( D 19 ) are the following set:
P = { 3 , 7 , 11 , 13 , 17 , 19 , 23 , 29 , 31 , 37 , 41 , 43 , 47 , 53 , 59 , 61 , 67 , 71 , 73 , 193 , 421 , 601 , 643 } .
Definition 2.15. 
The graph related to the set of number of diagonals of regular polygons, denoted by Γ ( P n ) , is an undirected simple graph whose vertices are { 4 , 5 , 6 , . . } that is the number of gon in regular polygons for n = 4 , 5 , and two distinct vertices n and m are adjacent if and only if the difference of number of diagonals of n-gon and m-gon be a prime number.
Proposition 2.16. 
The graph Γ ( P n ) is a bipartite graph with two parts V 1 = { 4 , 7 , 8 , 11 , 12 , 15 } and V 2 = { 5 , 6 , 9 , 10 , 13 , 14 } .
Proof. 
Clearly every element of V 1 is of the form 4 + 4 n for n = 0 , 1 , 2 , or 3 + 4 n for n = 1 , 2 , and every element of V 2 is of the form 5 + 4 n or 6 + 4 n for n = 0 , 1 , 2 , . Now if x , y V 1 , then x = 4 + 4 n or x = 3 + 4 n and y = 4 + 4 n or y = 3 + 4 n . In any case, we have
x ( x 3 ) 2 y ( y 3 ) 2
is an even and so is not prime. Thus x is not adjacent to y. Similarly, any two elements of V 2 are not adjacent. □
Example 2.17. 
From the Figure 5, the following can be obtained for the graph Γ ( P n ) :
(a)
The graph Γ ( P n ) is not connected for 8 n 41 ;
(b)
28 is an isolated vertex for 28 n 41 ;
(c)
g ( Γ ( P n ) ) = for n 39 and g ( Γ ( P 40 ) ) = 4 ;
(d)
d i a m ( Γ ( P n ) ) = 5 for 9 n 39 and d i a m ( Γ ( P 40 ) ) = 9 ;
(e)
If n is an odd number, then the set of prime numbers generated from Γ ( P n ) is n 1 2 first elements of P in Example 2.14. For example Γ ( P 23 ) this set is
{ 3 , 7 , 11 , 13 , 17 , 19 , 23 , 29 , 31 , 37 , 41 } .

References

  1. J. A Bondy and U.S.R. Murty, Graph Theory with Applications, American Elsevier, New York, 1976.
Figure 1. Γ + ( D 9 ) .
Figure 1. Γ + ( D 9 ) .
Preprints 168617 g001
Figure 2.
Figure 2.
Preprints 168617 g002
Figure 3.
Figure 3.
Preprints 168617 g003
Figure 4. Γ ( D 38 ) .
Figure 4. Γ ( D 38 ) .
Preprints 168617 g004
Figure 5. Γ ( P 41 ) .
Figure 5. Γ ( P 41 ) .
Preprints 168617 g005
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings

© 2026 MDPI (Basel, Switzerland) unless otherwise stated