The sequence A193681: Discriminant of minimal polynomial of $2*cos(\pi/n)$ has a lot of powers and almost-powers of $n$. Here's a picture.
A135517 x n^(EulerPhi[2 n]/2 - 1) / A193681 gives
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 5, 9, 1, 1, 27, 5, 1, 9, 7, 1, 135, 1, 1, 81, 1, 175, 81, 1, 1, 243, 125, 1, 1701, 1, 11, 2025, 1, 1, 2187, 49, 125, 2187, 13, 1, 729, 6875, 343, 6561, 1, 1, 273375, 1, 1
EulerPhi and Euler polynomials so far, all primes and powers of 2 handled, but still a sequence lacking a simple function.
Some of the $n$ with discriminant exactly $n^p$ are $1^{1}, 5^{1}, 7^{2}, 9^{2}, 11^{4}, 13^{5}, 17^{7}, 19^{8}, 23^{10}, 29^{13}, 31^{14}, 37^{17}, 41^{19}, 43^{20}, 45^{9}, 47^{22}, 49^{19}, 53^{25}, 59^{28}, 61^{29}, 67^{32}, 71^{34}, 73^{35}, 79^{38}, 83^{40}, 89^{43}, 97^{47}, 101^{49}, 103^{50}, 107^{52}, 109^{53}, 113^{55}, 121^{52}, 127^{62}, 131^{64}, 137^{67}, 139^{68}, 149^{73}, 151^{74}, 157^{77}, 163^{80}, 167^{82}, 173^{85}, 179^{88}$.
What about the rest? Here are values {n,p,a,b} so that discriminant of minimal polynomial of $2*cos(\pi/n)$ is $n^p a^b$
Is there any rhyme or reason to this sequence?
{{1,1,1,1}, {2,1,2,-1}, {3,1,3,-1}, {4,1,2,1}, {5,1,1,1},
{6,1,2,1}, {7,2,1,1}, {8,4,2,-1}, {9,2,1,1}, {10,3,2,1},
{11,4,1,1}, {12,4,3,-2}, {13,5,1,1}, {14,5,2,1}, {15,3,3,-1},
{16,8,2,-1}, {17,7,1,1}, {18,4,12,1}, {19,8,1,1}, {20,6,2,4},
{21,5,3,-2}, {22,9,2,1}, {23,10,1,1}, {24,8,3,-4}, {25,8,5,1},
{26,11,2,1}, {27,7,3,1}, {28,10,2,4}, {29,13,1,1}, {30,4,20,2},
{31,14,1,1}, {32,16,2,-1}, {33,9,3,-4}, {34,15,2,1}, {35,10,5,-1},
{36,9,2,6}, {37,17,1,1}, {38,17,2,1}, {39,11,3,-5}, {40,16,5,-4},
{41,19,1,1}, {42,12,189,-2}, {43,20,1,1}, {44,18,2,4}, {45,9,1,1},
{46,21,2,1}, {47,22,1,1}, {48,16,3,-8}, {49,19,1,1}, {50,17,40,1},
{51,15,3,-7}, {52,22,2,4}, {53,25,1,1}, {54,15,2,3}, {55,18,5,-3},
{56,24,7,-4}, {57,17,3,-8}, {58,27,2,1}, {59,28,1,1}, {60,16,45,-4},
{61,29,1,1}, {62,29,2,1}, {63,15,3,-3}, {64,32,2,-1}, {65,22,5,-4},
{66,20,2673,-2}, {67,32,1,1}, {68,30,2,4}, {69,21,3,-10}, {70,18,56,2},
{71,34,1,1}, {72,18,2,18}, {73,35,1,1}, {74,35,2,1}, {75,18,32805,-1},
{76,34,2,4}, {77,27,7,-2}, {78,24,9477,-2}, {79,38,1,1}, {80,32,5,-8},
{81,23,3,2}, {82,39,2,1}, {83,40,1,1}, {84,24,189,-4}, {85,30,5,-6},
{86,41,2,1}, {87,27,3,-13}, {88,36,2,12}, {89,43,1,1}, {90,18,2,6},
{91,33,7,-3}, {92,42,2,4}, {93,29,3,-14}, {94,45,2,1}, {95,34,5,-7},
{96,32,3,-16}, {97,47,1,1}, {98,38,112,1}, {99,27,3,-9}, {100,35,2,10},
{101,49,1,1}, {102,32,111537,-2}, {103,50,1,1}, {104,44,2,12}, {105,20,405,-2},
{106,51,2,1}, {107,52,1,1}, {108,30,2,12}, {109,53,1,1}, {110,30,42592,2},
{111,35,3,-17}, {112,48,7,-8}, {113,55,1,1}, {114,36,373977,-2}, {115,42,5,-9},
{116,54,2,4}, {117,33,3,-12}, {118,57,2,1}, {119,45,7,-5}, {120,32,45,-8},
{121,52,1,1}, {122,59,2,1}, {123,39,3,-19}, {124,58,2,4}, {125,46,5,-1},
{126,27,56,3}, {127,62,1,1}, {128,64,2,-1}, {129,41,3,-20}, {130,36,1352,4},
{131,64,1,1}, {132,40,2673,-4}, {133,51,7,-6}, {134,65,2,1}, {135,30,5,-3},
{136,60,2,12}, {137,67,1,1}, {138,44,4074381,-2}, {139,68,1,1}, {140,36,448,4},
{141,45,3,-22}, {142,69,2,1}, {143,55,11,-1}, {144,48,3,-24}, {145,54,5,-12},
{146,71,2,1}, {147,39,2711943423,-1}, {148,70,2,4}, {149,73,1,1}, {150,40,45,-10},
{151,74,1,1}, {152,68,2,12}, {153,45,3,-18}, {154,50,3872,2}, {155,58,5,-13},
{156,48,9477,-4}, {157,77,1,1}, {158,77,2,1}, {159,51,3,-25}, {160,64,5,-16},
{161,63,7,-8}, {162,47,384,1}, {163,80,1,1}, {164,78,2,4}, {165,36,820125,-2},
{166,81,2,1}, {167,82,1,1}, {168,48,189,-8}, {169,74,13,1}, {170,64,10625,-4},
{171,51,3,-21}, {172,82,2,4}, {173,85,1,1}, {174,56,138706101,-2}, {175,53,1715,-1},
{176,80,11,-8}, {177,57,3,-28}, {178,87,2,1}, {179,88,1,1}, {180,36,2,24}}
