This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A004124 M2383 #64 Feb 16 2025 08:32:28 %S A004124 1,1,-3,-4,125,-3,-16807,256,-19683,125,-2357947691,144,1792160394037, %T A004124 -16807,1265625,16777216,2862423051509815793,-19683, %U A004124 -5480386857784802185939,4000000,205924456521,-2357947691,-39471584120695485887249589623,5308416 %N A004124 Discriminant of n-th cyclotomic polynomial. %C A004124 n and a(n) have the same prime factors, except when 2 divides n but 4 does not divide n, then n/2 and a(n) have the same prime factors. %C A004124 a(n) is negative <=> phi(n) == 2 (mod 4) <=> n = 4 or n is of the form p^e or 2*p^e, where p is a prime congruent to 3 modulo 4. - _Jianing Song_, May 17 2021 %D A004124 E. R. Berlekamp, Algebraic Coding Theory, McGraw-Hill, NY, 1968, p. 91. %D A004124 D. Marcus, Number Fields. Springer-Verlag, 1977, p. 27. %D A004124 P. Ribenboim, Classical Theory of Algebraic Numbers, Springer, 2001, pp. 118-9 and p. 297. %D A004124 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A004124 Gheorghe Coserea, <a href="/A004124/b004124.txt">Table of n, a(n) for n = 1..388</a> (first 100 terms from T. D. Noe) %H A004124 Mohammad K. Azarian, <a href="http://ijpam.eu/contents/2007-36-2/9/9.pdf">On the Hyperfactorial Function, Hypertriangular Function, and the Discriminants of Certain Polynomials</a>, International Journal of Pure and Applied Mathematics 36(2), 2007, pp. 251-257. MR2312537. Zbl 1133.11012. %H A004124 J. Shallit, <a href="/A004124/a004124.pdf">Letter to N. J. A. Sloane</a>, Mar 25 1980. %H A004124 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PolynomialDiscriminant.html">Polynomial Discriminant</a>. %F A004124 Sign(a(n)) = (-1)^(phi(n)*(phi(n)-1)/2). Magnitude: For prime p, a(p) = p^(p-2). For n = p^e, a prime power, a(n) = p^(((p-1)*e-1)*p^(e-1)). For n = Product_{i=1..k} p_i^e_i, a product of prime powers, a(n) = Product_{i=1..k} a(p_i^e_i)^phi(n/p_i^e_i). %F A004124 a(n) = Sign(a(n))*(n^phi(n))/(Product_{p|n, p prime} p^(phi(n)/(p-1))). See the Ribenboim reference, p. 297, eq.(1), with the sign taken from the previous formula and n=2 included. - _Wolfdieter Lang_, Aug 03 2011 %e A004124 a(100) = 2^40 * 5^70. %e A004124 a(100) = ((-1)^(40*39/2))*(100^40)/(2^(40/1)*5^(40/4)) = +2^40*5^70. - _Wolfdieter Lang_, Aug 03 2011 %t A004124 PrimePowers[n_] := Module[{f, t}, f=FactorInteger[n]; t=Transpose[f]; First[t]^Last[t]]; app[pp_] := Module[{f, p, e}, f=FactorInteger[pp]; p=f[[1, 1]]; e=f[[1, 2]]; p^(((p-1)e-1) p^(e-1))]; SetAttributes[app, Listable]; a[n_] := Module[{pp, phi=EulerPhi[n]}, If[n==1, 1, pp=PrimePowers[n]; (-1)^(phi*(phi-1)/2) Times@@(app[pp]^EulerPhi[n/pp])]]; Table[a[n], {n, 24}] %t A004124 a[n_] := Discriminant[ Cyclotomic[n, x], x]; Table[a[n], {n, 1, 24}] (* _Jean-François Alcover_, Dec 06 2011 *) %o A004124 (PARI) a(n) = poldisc(polcyclo(n)); %o A004124 (PARI) %o A004124 a(n) = { %o A004124 my(f = factor(n), fsz = matsize(f)[1], %o A004124 g = prod(k=1, fsz, f[k,1]), %o A004124 h = prod(k=1, fsz, f[k,1]-1), phi = (n\g)*h, %o A004124 r = prod(k=1, fsz, f[k,1] ^ ((phi\(f[k,1]-1)) * (f[k,2]*(f[k,1]-1)-1)))); %o A004124 return((1-2*((phi\2)%2)) * r); %o A004124 }; %o A004124 vector(24, n, a(n)) \\ _Gheorghe Coserea_, Oct 31 2016 %K A004124 sign,easy,nice %O A004124 1,3 %A A004124 _N. J. A. Sloane_ %E A004124 Edited by _T. D. Noe_, Sep 30 2003