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.

A354082 The independence polynomial of the n-hypercube graph evaluated at -1.

This page as a plain text file.
%I A354082 #39 Jun 27 2025 22:01:35
%S A354082 0,-1,-1,3,7,11,143,7715
%N A354082 The independence polynomial of the n-hypercube graph evaluated at -1.
%C A354082 The independence number alpha(G) of a graph is the cardinality of the largest independent vertex set. The n-hypercube has alpha(G) = 1 for n = 0 and alpha(G) = 2^(n-1) for n >= 1. The independence polynomial for the n-hypercube is given by Sum_{k=0..alpha(G)} A354802(n,k)*t^k, meaning that a(n) is the alternating sum of row n of A354802.
%C A354082 Jenssen, Perkins and Potukuchi proved asymptotics for independent sets of given size.
%C A354082 It appears that this sequence remains positive for n > 3.
%H A354082 M. Jenssen, W. Perkins and A. Potukuchi, <a href="https://doi.org/10.1017/S0963548321000559">Independent sets of a given size and structure in the hypercube</a>, Combinatorics, Probability and Computing, 2022, 1-19; see also <a href="https://arxiv.org/abs/2106.09709">arXiv:2106.09709</a> [math.CO], 2021-2022.
%H A354082 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/HypercubeGraph.html">Hypercube graph</a>
%H A354082 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/IndependencePolynomial.html">Independence polynomial</a>
%e A354082 Row 3 of A354802 is 1, 8, 16, 8, 2. This means the 3-hypercube cube graph has independence polynomial 1 + 8*t + 16*t^2 + 8*t^3 + 2*t^4. Taking the alternating row sum of row 3, or evaluating the polynomial at -1, gives us 1 - 8 + 16 - 8 + 2 = 3 = a(3).
%o A354082 (Sage) from sage.graphs.connectivity import connected_components
%o A354082 def recurse(g):
%o A354082     if g.order() == 0:
%o A354082             return 1
%o A354082     comp = g.connected_components()
%o A354082     if len(comp[-1]) == 1:
%o A354082         return 0
%o A354082     elif len(comp) > 1:
%o A354082         prod = 1
%o A354082         for c in comp:
%o A354082             if prod == 0:
%o A354082                 return 0
%o A354082             else:
%o A354082                 prod = prod*recurse(g.subgraph(vertices=c))
%o A354082         return prod
%o A354082     min_degree_vertex = g.vertices()[0]
%o A354082     for v in g.vertices():
%o A354082         if g.degree(v) < g.degree(min_degree_vertex):
%o A354082             min_degree_vertex = v
%o A354082     to_remove_edge =  g.edges_incident(min_degree_vertex)[0]
%o A354082     to_remove_vertices = [to_remove_edge[0], to_remove_edge[1]]
%o A354082     to_remove_vertices.extend(g.neighbors(to_remove_edge[0]))
%o A354082     to_remove_vertices.extend(g.neighbors(to_remove_edge[1]))
%o A354082     to_remove_vertices = list(set(to_remove_vertices))
%o A354082     without_neighborhoods = copy(g)
%o A354082     without_edge = copy(g)
%o A354082     without_neighborhoods.delete_vertices(to_remove_vertices)
%o A354082     without_edge.delete_edge(to_remove_edge)
%o A354082     return recurse(without_edge) - recurse(without_neighborhoods)
%o A354082 def a(n):
%o A354082     if n == 0:
%o A354082         return recurse(graphs.CompleteGraph(1))
%o A354082     else:
%o A354082         return recurse(graphs.CubeGraph(n))
%o A354082 # _Christopher Flippen_ and Scott Taylor, Jun 05 2022
%Y A354082 Cf. A027624, A354802.
%K A354082 sign,more
%O A354082 0,4
%A A354082 _Christopher Flippen_, Jun 05 2022