cp's OEIS Frontend

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.

A138800 Number of monomials in discriminant of polynomial x^n + a_{n-2} x^{n-2} + ... + a_0.

Original entry on oeis.org

1, 1, 2, 6, 19, 76, 320, 1469, 7048, 35233, 181656, 960800, 5189579
Offset: 1

Views

Author

Artur Jasinski, Mar 30 2008

Keywords

Examples

			a(4)=6 because discriminant of quartic x^4+a*x^2+b*x+c is -4*a^3*b^2 - 27*b^4 + 16*a^4*c + 144*a*b^2*c - 128*a^2*c^2 + 256*c^3 that consists of 6 monomials (parts).
		

Crossrefs

Programs

  • Maple
    1, 1, seq(nops(expand(discrim(x^n + add(c[i]*x^i,i=0..n-2),x))),n=3..12); # Robert Israel, Aug 10 2015
  • Mathematica
    ClearAll[f]; a = {1,1}; Do[k = 0; Do[If[n > s - 2, If[n > s - 1, k = k + x^n], k = k + f[n] x^n], {n, 0, s}]; m = Resultant[k, D[k, x], x]; AppendTo[a, Length[m]], {s, 3, 8}]; a (* fixed by Vaclav Kotesovec, Mar 20 2019 *)
    Flatten[{1, 1, Table[Length[Discriminant[x^n + Sum[Subscript[c, k]*x^k, {k, 0, n-2}], x]], {n, 3, 8}]}] (* Vaclav Kotesovec, Mar 20 2019 *)

Extensions

a(2) and Mathematica program corrected [previously had erroneous a(2)=2 because of Length syntax in Mathematica] by Alan Sokal and Andrea Sportiello (sokal(AT)nyu.edu), Jun 17 2010
a(9) to a(12) from Robert Israel, Aug 10 2015
a(13) from Vaclav Kotesovec, Mar 28 2019