# Size of Centers of groups of order 288

How can I list the sizes of centers of groups of order $288$ in GAP? By GAP we know that there are $1045$ groups of this order by the command below:

G:=AllSmallGroups(288);;


I want to obtain Size(Center(G[i])) for $i = 1, \dots, 1045$ , respectively.

In fact I want to compute the difference between values of Size(Center(G[i])) and NrConjugacyClasses of corresponding G[i], for $i = 1, \dots, 1045$.

• What is stopping you? – Tobias Kildetoft Jan 2 '17 at 10:18
• By looping over all of the 1045 groups, I would guess? – TastyRomeo Jan 2 '17 at 10:20
• If this is just about how to make GAP do this, then it is not a very good fit for this site, but I would suggest you look up the List function. – Tobias Kildetoft Jan 2 '17 at 10:35
• It is time-consuming. I want a command or program which shows the list immediately. Like List(G,NrConjugacyClasses). – M. R. Jan 2 '17 at 10:35
• Computing that difference took about 10-20 second on my 5-year old laptop. – Tobias Kildetoft Jan 2 '17 at 10:50

This is the way I do; I don't know more shortcult commands (but there are)!

G:=AllSmallGroups(288);;
l:=[ ];;
for i in [1..Size(G)] do

• Note that shorter code may not be the most efficient one, especially if NrSmallGroups(n) is very large. You can iterate like for i in [1..NrSmallGroups(n)] do g:=SmallGroup(n,i); ... od. Also sometimes SmallGroupsInformation gives useful insights into how the groups of a given order are arranged in the library. I suggest to look at Software Carpentry lesson on GAP for some sample code. – Alexander Konovalov Jan 2 '17 at 21:44