Student numbers are used for the purpose of selecting and organizing students in class activities for efficient class management. Students with adjacent student numbers are more likely to engage in repetitive group activities in both curricular and extracurricular activities. The design of having adjacent student numbers can act as a stimulus to help students make friendship choices, suggesting a default friendship relationship. The purpose of this study is to investigate how student numbers create friendships in a confusing and uncertain class environment during the transition period between schools and to investigate how student number-based friendships protect against school violence. This study examines the function of student numbers from the viewpoint of behavioral economics and network expansion. The participants in this study were __ first year students at a coed middle school, where new peer status is formed. The results of the study indicate that friendships are formed around student numbers, and that these friendships are extended to the entire class. The total number of friends formed in this way plays a role in defending and preventing victims of school violence. The friendship-forming function of adjacent student numbers can be explained by the analogy of a snowball: In order to form a snowball, snow is initially gathered together, but after a ball is formed, it grows in size as it rolls around and collects more snow. The reduction in friendship relationships and experiences of school violence based on student numbers is an unintentional external effect and can be underestimated because it goes unrecognized. In education, it is necessary to actively encourage activities based on student numbers.