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 A153731 #49 Feb 16 2025 08:33:09 %S A153731 1,-2,1,1,-10,1,576,-960,352,-40,1,46225,-5596840,13950764,-7453176, %T A153731 1513334,-141912,6476,-136,1,2000989041197056,-44660812492570624, %U A153731 183876928237731840,-255690851718529024,172580952324702208,-65892492886671360,15459151516270592 %N A153731 Triangle read by rows: nonzero coefficients of Swinnerton-Dyer polynomials. %C A153731 Within each row, coefficients are listed in order of increasing degree. The n-th row lists the coefficients of the polynomial corresponding to the set {2, 3, ..., prime(n)}. All odd-degree terms have coefficient 0. %D A153731 Roman E. Maeder. Programming in Mathematica, Addison-Wesley, 1990, page 105. %H A153731 Alois P. Heinz, <a href="/A153731/b153731.txt">Rows n = 0..10, flattened</a> %H A153731 Lucas A. Brown, <a href="https://github.com/lucasaugustus/oeis/blob/main/A153731.py">Python program</a>. %H A153731 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Swinnerton-DyerPolynomial.html">Swinnerton-Dyer Polynomial</a>. %H A153731 Wikipedia, <a href="https://en.wikipedia.org/wiki/Swinnerton-Dyer_polynomial">Swinnerton-Dyer polynomial</a>. %e A153731 The first few rows are: %e A153731 [0] 1; %e A153731 [1] -2, 1; %e A153731 [2] 1, -10, 1; %e A153731 [3] 576, -960, 352, -40, 1; %e A153731 [4] 46225, -5596840, 13950764, -7453176, 1513334, -141912, 6476, -136, 1; %e A153731 .... %e A153731 x, -2 + x^2, 1 - 10*x^2 + x^4, 576 - 960*x^2 + 352*x^4 - 40*x^6 + x^8, ... %p A153731 p:= proc(n) option remember; expand(`if`(n=0, x, mul( %p A153731 subs(x=x+i*sqrt(ithprime(n)), p(n-1)), i=[1, -1]))) %p A153731 end: %p A153731 T:= n-> ListTools[Reverse]([coeffs(p(n))])[]: %p A153731 seq(T(n), n=0..5); # _Alois P. Heinz_, Nov 28 2024 %t A153731 SwinnertonDyerP[0, x_ ] := x; SwinnertonDyerP[n_, x_ ] := Module[{sd, srp = Sqrt[Prime[n]]}, sd[y_] = SwinnertonDyerP[n - 1, y]; Expand[ sd[x + srp] sd[x - srp] ] ]; row[n_] := CoefficientList[ SwinnertonDyerP[n, x], x^2]; Table[row[n], {n, 1, 5}] // Flatten (* _Jean-François Alcover_, Nov 09 2012 *) %t A153731 (* Second program: *) %t A153731 SwinnertonDyerP[n_Integer?Positive, x_] := %t A153731 Block[{arg, poly, i}, %t A153731 args = Outer[Times, Table[Sqrt[Prime[i]], {i, n}], {-1, 1}]; %t A153731 poly = Outer[Plus, {x}, Sequence @@ args]; %t A153731 Expand[Times @@ Flatten[poly]]] %t A153731 Table[Select[CoefficientList[SwinnertonDyerP[n, x], x], # != 0 &], {n, 1, 4}] // TableForm (* _Peter Luschny_, Jun 12 2022 *) %o A153731 (Julia) %o A153731 using Nemo %o A153731 function A153731Row(n) %o A153731 R, x = PolynomialRing(ZZ, "x") %o A153731 p = swinnerton_dyer(n, x) %o A153731 [coeff(p, j) for j in 0:2:2^n] end %o A153731 for n in 1:4 A153731Row(n) |> println end # _Peter Luschny_, Mar 13 2018 %o A153731 (Magma) // Note that Magma, like Mathworld, defines the polynomials for n >= 1. %o A153731 P<x> := PolynomialRing(IntegerRing()); %o A153731 for n := 1 to 5 do %o A153731 p := SwinnertonDyerPolynomial(n); %o A153731 [c : c in Coefficients(p) | not IsZero(c)]; %o A153731 end for; // _Peter Luschny_, Jun 12 2022 %o A153731 (Python) # See LINKS %Y A153731 Cf. A247209, A354913 (left column). %K A153731 sign,look,tabf %O A153731 0,2 %A A153731 _Eric W. Weisstein_, Dec 31 2008 %E A153731 One term (row 0) prepended by _Alois P. Heinz_, Nov 28 2024