code: def andre_poly(n, x=None, polys=False):
      r"""Generates the Andre polynomial `\mathcal{A}_n(x)`.
  
      This is the Appell sequence where the constant coefficients form the sequence
      of Euler numbers ``euler(n)``. As such they have integer coefficients
      and parities matching the parity of `n`.
  
      Luschny calls these the *Swiss-knife polynomials* because their values
      at 0 and 1 can be simply transformed into both the Bernoulli and Euler
      numbers. Here they are called the Andre polynomials because
      `|\mathcal{A}_n(n\bmod 2)|` for `n \ge 0` generates what Luschny calls
      the *Andre numbers*, A000111 in the OEIS.
  
      Examples
      ========
  
      >>> from sympy import bernoulli, euler, genocchi
      >>> from sympy.abc import x
      >>> from sympy.polys import andre_poly
      >>> andre_poly(9, x)
      x**9 - 36*x**7 + 630*x**5 - 5124*x**3 + 12465*x
  
      >>> [andre_poly(n, 0) for n in range(11)]
      [1, 0, -1, 0, 5, 0, -61, 0, 1385, 0, -50521]
      >>> [euler(n) for n in range(11)]
      [1, 0, -1, 0, 5, 0, -61, 0, 1385, 0, -50521]
      >>> [andre_poly(n-1, 1) * n / (4**n - 2**n) for n in range(1, 11)]
      [1/2, 1/6, 0, -1/30, 0, 1/42, 0, -1/30, 0, 5/66]
      >>> [bernoulli(n) for n in range(1, 11)]
      [1/2, 1/6, 0, -1/30, 0, 1/42, 0, -1/30, 0, 5/66]
      >>> [-andre_poly(n-1, -1) * n / (-2)**(n-1) for n in range(1, 11)]
      [-1, -1, 0, 1, 0, -3, 0, 17, 0, -155]
      >>> [genocchi(n) for n in range(1, 11)]
      [-1, -1, 0, 1, 0, -3, 0, 17, 0, -155]
  
      >>> [abs(andre_poly(n, n%2)) for n in range(11)]
      [1, 1, 1, 2, 5, 16, 61, 272, 1385, 7936, 50521]
  
      Parameters
      ==========
  
      n : int
          Degree of the polynomial.
      x : optional
      polys : bool, optional
          If True, return a Poly, otherwise (default) return an expression.
  
      See Also
      ========
  
      sympy.functions.combinatorial.numbers.andre
  
      References
      ==========
  
      .. [1] Peter Luschny, "An introduction to the Bernoulli function",
             https://arxiv.org/abs/2009.06743
      """
      return named_poly(
          n, dup_andre, ZZ, "Andre polynomial", (x,), polys
      )
  
file_path: sympy/sympy/polys/appellseqs.py
imports: from sympy.polys.densearith import dup_mul_ground, dup_sub_ground, dup_quo_ground
  from sympy.polys.densetools import dup_eval, dup_integrate
  from sympy.polys.domains import ZZ, QQ
  from sympy.polys.polytools import named_poly
  from sympy.utilities import public
label_desc: Use image node_id 10 for calling a global function with example usage: andre_poly(n, x, polys) and returns: named_poly