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.

Showing 1-4 of 4 results.

A354913 Nonzero coefficient with smallest index in polynomial p_n(x), where p_n(x) = Product_{i={-1,1}} p_{n-1}(x + i*sqrt(prime(n))), starting with p_0(x) = x.

Original entry on oeis.org

1, -2, 1, 576, 46225, 2000989041197056, 198828783273803025550632280753863681, 6104549033356152351183622743336946156997116945571290671544232012635281247174656
Offset: 0

Views

Author

Alois P. Heinz, Jun 12 2022

Keywords

Comments

These polynomials are known as Swinnerton-Dyer polynomials: p_n(x) is of degree 2^n and has 2^n = A000079(n) real roots, which are the sums and differences of the square roots of the first n primes.
For n>=1, a(n) is also the product of all 2^n sums and differences of the square roots of the first n primes.
For n>=2, each term is a perfect square; the square roots are 1, 24, 215, 44732416, ... (A376552).

Examples

			The first polynomials p_0(x) ... p_3(x) are:
  x,
  x^2 -2,
  x^4 -10*x^2 +1,
  x^8 -40*x^6 +352*x^4 -960*x^2 +576,
  so the sequence starts 1, -2, 1, 576.
p_0(x) has 2^0 = 1 root: 0 (empty sum).
p_1(x) has 2^1 = 2 roots: -sqrt(2), sqrt(2); their product gives a(1) = -2.
p_2(x) has 2^2 = 4 roots: -sqrt(2)-sqrt(3), -sqrt(2)+sqrt(3), sqrt(2)-sqrt(3), sqrt(2)+sqrt(3); their product gives a(2) = 1.
		

Crossrefs

Programs

  • Maple
    p:= proc(n) option remember; expand(`if`(n=0, x, mul(
          subs(x=x+i*sqrt(ithprime(n)), p(n-1)), i=[1, -1])))
        end:
    a:= n-> coeff(p(n), x, 1-signum(n)):
    seq(a(n), n=0..8);
  • Mathematica
    p[n_] := p[n] = Expand[If[n == 0, x, Product[
         p[n-1] /. x -> x+i*Sqrt[Prime[n]], {i, {1, -1}}]]];
    a[n_] := Coefficient[p[n], x, 1-Sign[n]];
    Table[a[n], {n, 0, 8}] (* Jean-François Alcover, Jun 25 2022, after Alois P. Heinz *)
  • Python
    # See LINKS

Formula

a(n) = [x^A000007(n)] p_n(x), with p_n(x) = Product_{v={-1,1}^n} (x + Sum_{i=1..n} v[i]*sqrt(prime(i))).

A247209 Number of terms in generalized Swinnerton-Dyer polynomials.

Original entry on oeis.org

1, 2, 6, 35, 495, 20349, 2760681, 1329890705, 2353351951665, 15481400876017505, 379554034822178909121, 34676179189150610052785025, 11806724418359403847522843860225, 14998128029851443976142151169687652865, 71221988684076361563783957084457295633613825
Offset: 0

Views

Author

Morgan L. Owens, Nov 25 2014

Keywords

Comments

If the sequence of primes used in the construction of Swinnerton-Dyer polynomials is replaced by the generic sequence a_1, a_2, ..., a_n, this sequence gives the number of terms in the resulting multivariate polynomial (treating the a_n as variables).
a(n-1) is the number of monomials obtained when multiplying all the possible cases Sum_{k=1..n} e_k*sqrt(x_k) where e_1 is 1 and all other e_i are +1 or -1; so that 1/(Sum_{k=1..n} sqrt(x_k)) is transformed into a fraction whose denominator has no radicals. See the French link. - Michel Marcus, Jun 12 2022

Examples

			a(3) = 35. For the three numbers a, b, c, the general Swinnerton-Dyer polynomial is
(sqrt(a)+sqrt(b)+sqrt(c)-z)(-sqrt(a)+sqrt(b)+sqrt(c)-z)(sqrt(a)-sqrt(b)+sqrt(c)-z)(-sqrt(a)-sqrt(b)+sqrt(c)-z)(sqrt(a)+sqrt(b)-sqrt(c)-z)(-sqrt(a)+sqrt(b)-sqrt(c)-z)(sqrt(a)-sqrt(b)-sqrt(c)-z)(-sqrt(a)-sqrt(b)-sqrt(c)-z)
which expands to
a^4-4a^3b+6a^2b^2-4ab^3+b^4-4a^3c+4a^2bc+4ab^2c-4b^3c+6a^2c^2+4abc^2+6b^2c^2-4ac^3-4bc^3+c^4- 4a^3z^2+4a^2bz^2+4ab^2z^2-4b^3z^2+4a^2cz^2-40abcz^2+ 4b^2cz^2+4ac^2z^2+4bc^2z^2-4c^3z^2+6a^2z^4+4abz^4+ 6b^2z^4+4acz^4+4bcz^4+6c^2z^4-4az^6-4bz^6-4cz^6+z^8
with 35 terms.
		

Crossrefs

Cf. A153731.

Programs

  • Maple
    a:= n-> (t-> binomial(t+n, t))(2^(n-1)):
    seq(a(n), n=0..14);  # Alois P. Heinz, Nov 28 2024
  • Mathematica
    a[n_]:= Module[{a,x}, Length@Fold[Expand[(#1 /. x -> x + #2) (#1 /. x -> x - #2)] &, x, Sqrt[a /@ Range[n]]]]; a[0] = 1; Array[a, 5, 0] (* or *)
    a[n_]:= Binomial[2^(n - 1) + n, 2^(n - 1)]; Array[a, 10, 0]

Extensions

a(0) = 1 prepended by Michel Marcus, Jun 12 2022

A255587 Maximum absolute value of the coefficients of the n-th Swinnerton-Dyer polynomial.

Original entry on oeis.org

1, 2, 10, 960, 13950764, 255690851718529024, 1771080720430629161685158978892152599456, 857834471403601877816627441633642526746656338035964968069692458744011458425706833248256
Offset: 0

Views

Author

Jean-François Alcover, Feb 27 2015

Keywords

Examples

			SwinnertonDyerP(3, x) = x^8 - 40*x^6 + 352*x^4 - 960*x^2 + 576, hence a(3) = 960.
		

References

  • Roman E. Maeder, Programming in Mathematica, Addison-Wesley, 1990, page 105.

Crossrefs

Programs

  • Maple
    p:= proc(n) option remember; expand(`if`(n=0, x, mul(
          subs(x=x+i*sqrt(ithprime(n)), p(n-1)), i=[1, -1])))
        end:
    a:= n-> max(map(abs, [coeffs(p(n))])):
    seq(a(n), n=0..8);  # Alois P. Heinz, Jun 12 2022
  • Mathematica
    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]]]; a[n_] := CoefficientList[SwinnertonDyerP[n, x], x^2] // Abs // Max; Table[a[n], {n, 1, 10}]

Extensions

a(0)=1 prepended by Alois P. Heinz, Jun 12 2022

A376552 Square root of the product of all sums and differences of the square roots of the first n primes.

Original entry on oeis.org

1, 24, 215, 44732416, 445902212680990209, 2470738560300573839567485058051752329216, 194775879942444285383551347529278187374780378665463617801353369255538909241232419740031
Offset: 2

Views

Author

Lucas A. Brown, Nov 27 2024

Keywords

Comments

a(n) is the square root of the constant term of the Swinnerton-Dyer polynomial for the set {2, 3, 5, ..., prime(n)}. The constant terms themselves are A354913(n) for n >= 1; the nonzero coefficients of the polynomials are A153731.

Examples

			The Swinnerton-Dyer polynomial for n=1 is x^2 - 2, which has negative constant term, so we skip n = 1.
For n = 2, the Swinnerton-Dyer polynomial is (x + sqrt(2) + sqrt(3)) * (x + sqrt(2) - sqrt(3)) * (x - sqrt(2) + sqrt(3)) * (x - sqrt(2) - sqrt(3)) = x^4 - 10*x^2 + 1, so a(2) = 1.
For n = 3, the Swinnerton-Dyer polynomial is x^8 - 40*x^6 + 352*x^4 - 960*x^2 + 576, so a(3) = 24.
		

Crossrefs

Programs

  • Maple
    p:= proc(n) option remember; expand(`if`(n=0, x, mul(
          subs(x=x+i*sqrt(ithprime(n)), p(n-1)), i=[1, -1])))
        end:
    a:= n-> isqrt(coeff(p(n), x, 0)):
    seq(a(n), n=2..8);  # Alois P. Heinz, Nov 28 2024
  • Mathematica
    p[n_] := p[n] = Expand[If[n == 0, x, Product[p[n - 1] /. x -> x + i*Sqrt[Prime[n]], {i, {1, -1}}]]];
    a[n_] := Coefficient[p[n], x, 1 - Sign[n]] // Sqrt // Floor;
    Table[a[n], {n, 2, 10}] (* Jean-François Alcover, Jul 02 2025, after Alois P. Heinz *)
  • Python
    # See LINKS.

Formula

a(n) = sqrt(A354913(n)).
Showing 1-4 of 4 results.