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-10 of 12 results. Next

A000431 Expansion of 2*x^3/((1-2*x)^2*(1-4*x)).

Original entry on oeis.org

0, 0, 0, 2, 16, 88, 416, 1824, 7680, 31616, 128512, 518656, 2084864, 8361984, 33497088, 134094848, 536608768, 2146926592, 8588754944, 34357248000, 137433710592, 549744803840, 2199000186880, 8796044787712, 35184271425536, 140737278640128, 562949517213696
Offset: 0

Views

Author

Keywords

Comments

Number of permutations of length n with exactly one valley. Also (for n>0), the number of ways to pick two of the 2^(n-1) vertices of an n-1 cube that are not connected by an edge. - Aaron Meyerowitz, Apr 21 2014
a(n+1), n >= 1: Number of independent vertex pairs for Q_n, n >= 1: 2^(n-1) * (2^n - (n+1)) = T_(2^n - 1) - n * 2^(n-1) = L_n - E_n = A006516(n) - A001787(n), where L_n is the number of vertex pairs and E_n is the number of vertex pairs yielding edges. (Cf. A027624.) - Daniel Forgues, Feb 19 2015
From Petros Hadjicostas, Aug 08 2019: (Start)
Apparently, by saying "valley" of a permutation of [n], Aaron Meyerowitz indirectly assumes that a "valley" is an interior minimum of a permutation (i.e., we ignore possible minima at the endpoints). Since the complement of a permutation b_1 b_2 ... b_n (using one-line notation, not cycle notation) is (n+1-b_1) (n+1-b_2) ... (n+1-b_n), the current sequence is also the number of permutations of [n] with exactly one peak (that is, exactly one interior maximum).
Comtet (pp. 260-261 in his book) calls these peaks "intermediary peaks" to distinguish them from "left peaks" and "right peaks" (i.e., maxima at the endpoints).
(End)

Examples

			From _Petros Hadjicostas_, Aug 08 2019: (Start)
We have a(3) = 2 because the permutations 123, 132, 213, 231, 312, and 321 have exactly 0, 1, 0, 1, 0, and 0 peaks, respectively. Also, they have 0, 0, 1, 0, 1, and 0 valleys, respectively.
Note that permutations 132 and 231 (each one with 1 peak) are complements of permutations 312 and 213, respectively (each one with 1 valley).
Also, a(4) = 16 because
1234 -> 0 peaks and 0 valleys (complement of 4321);
1243 -> 1 peak and  0 valleys (complement of 4312);
1324 -> 1 peak and 1 valley (complement of 4231);
1342 -> 1 peak and 0 valleys (complement of 4213);
1423 -> 1 peak and 1 valley (complement of 4132);
1432 -> 1 peal and 0 valleys (complement of 4123);
2134 -> 0 peaks and 1 valley (complement of 3421);
2143 -> 1 peak and 1 valley (complement of 3412);
2314 -> 1 peak and 1 valley (complement of 3241);
2341 -> 1 peak and 0 valleys (complement of 3214);
2413 -> 1 peak and 1 valley (complement of 3142);
2431 -> 1 peak and 0 valleys (complement of 3124);
3124 -> 0 peaks and 1 valley (complement of 2431);
3142 -> 1 peak and 1 valley (complement of 2413);
3214 -> 0 peaks and 1 valley (complement of 2341);
3241 -> 1 peak and 1 valley (complement of 2314);
3412 -> 1 peak and 1 valley (complement of 2143);
3421 -> 1 peak and 0 valleys (complement of 2134);
4123 -> 0 peaks and 1 valley (complement of 1432);
4132 -> 1 peak and 1 valley (complement of 1423);
4213 -> 0 peaks and 1 valley (complement of 1342);
4231 -> 1 peak and 1 valleys (complement of 1324);
4312 -> 0 peaks and 1 valley (complement of 1243);
4321 -> 0 peaks and 0 valleys (complement of 1234).
(End)
		

References

  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 261.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column k=1 of A008303.

Programs

  • Magma
    [0] cat [(4^n - n*2^(n+1))/8: n in [1..30]]; // Vincenzo Librandi, Feb 18 2015
    
  • Maple
    A000431:=-2/(4*z-1)/(-1+2*z)**2; # Conjectured by Simon Plouffe in his 1992 dissertation. [Proved by Désiré André, 1895, p.154, for circular permutations (see A008303). Peter Luschny, Aug 07 2019]
    a:= n-> if n=0 then 0 else (Matrix([[2,0,0]]). Matrix(3, (i,j)-> if (i=j-1) then 1 elif j=1 then [8,-20,16][i] else 0 fi)^(n-1))[1,3] fi: seq(a(n), n=0..30); # Alois P. Heinz, Aug 26 2008
  • Mathematica
    nn = 30; CoefficientList[Series[2*x^3/((1 - 2*x)^2*(1 - 4*x)), {x, 0, nn}], x] (* T. D. Noe, Jun 20 2012 *)
    Join[{0}, LinearRecurrence[{8, -20, 16}, {0, 0, 2}, 30]] (* Jean-François Alcover, Jan 31 2016 *)
  • PARI
    concat(vector(3), Vec(2*x^3/((1-2*x)^2*(1-4*x)) + O(x^40))) \\ Michel Marcus, Jan 31 2016

Formula

From Mitch Harris, Apr 02 2004: (Start)
a(n) = Sum_{1..2^(n+1) - 1} A007814(k).
a(n) = (4^n - n 2^(n+1))/8 for n >= 1.
(End)
a(n) = 2*A100575(n-1). - R. J. Mathar, Mar 14 2011
a(n) = 2^(n-2) * (2^(n-1) - n), n >= 1. - Daniel Forgues, Feb 24 2015

A273461 Number of physically stable n X n placements of water source-blocks in Minecraft.

Original entry on oeis.org

1, 2, 9, 40, 484, 9717, 338724, 21624680, 2504301849, 520443847520, 195145309791364, 131850659243316222, 160668896658179472676, 352891729183598844656996, 1397187513066371784602204416, 9972288382286063615850619475640
Offset: 0

Views

Author

Gus Wiseman, May 23 2016

Keywords

Comments

In Minecraft worlds, a source block of water can be reacted with another source block, two blocks away. This reaction creates a third "infinite" source block in the unoccupied intermediate block, so called because if the intermediate water source is destroyed or picked up by a player using a bucket, it will immediately regenerate itself.
A placement of water at several positions in an n X n board is said to be *stable* if no infinite water physics can in fact occur (under otherwise optimal conditions). This means that the total quantity of water in the system is held constant.
In short, no two source blocks can be graph-distance 2 from each other. - Gus Wiseman, Nov 27 2019
Often incorrectly described as cellular automata, the observed behaviors of liquids within a board are inseparable in certain ways from states of affair outside of the board and events outside of the system. This aspect of Minecraft is poorly understood.

Examples

			a(2) = 9: {{}, {(2,2)}, {(2,1)}, {(2,1),(2,2)}, {(1,2)}, {(1,2),(2,2)}, {(1,1)}, {(1,1),(2,1)}, {(1,1),(1,2)}}.
		

Crossrefs

The one-dimensional version is A006498.
Dominated by A329871.

Programs

  • Mathematica
    stableSets[u_,Q_]:=If[Length[u]===0,{{}},With[{w=First[u]},Join[stableSets[DeleteCases[u,w],Q],Prepend[#,w]&/@stableSets[DeleteCases[u,r_/;r===w||Q[r,w]||Q[w,r]],Q]]]];
    allflows[n_]:=stableSets[Join@@Array[List,{n,n}],Function[{v,w},Plus@@Abs/@(w-v)===2]];
    Table[Length[allflows[i]],{i,6}] (* Gus Wiseman, May 23 2016 *)

Extensions

a(7) from Tae Lim Kook, May 25 2016
a(8) from Tae Lim Kook, May 29 2016
a(7)-a(8) corrected by Christopher Cormier, Dec 17 2019
a(9)-a(15) from Christopher Cormier, Dec 19 2019

A329871 Number of static n X n placements of water source-blocks in Minecraft.

Original entry on oeis.org

1, 2, 10, 55, 754, 18853, 82931, 70143802, 11087020614, 3243227117597, 1772826333285009, 1806938280429412270, 3430002591378184399879, 12137184871791092506807847, 80047171080361800628780500638, 983838070049011459232146327319193
Offset: 0

Views

Author

Gus Wiseman, Nov 26 2019

Keywords

Comments

In Minecraft worlds, a source block of water can be reacted with another source block, two blocks away, linearly or diagonally. This reaction creates a third "infinite" source block in the unoccupied intermediate block or blocks, so called because if the intermediate water source is destroyed or picked up by a player using a bucket, it will immediately regenerate itself.
A placement of water at several positions in an n X n board is said to be static if no infinite water sources are created that are not already present. In particular, the total quantity of water in the system is held constant.

Crossrefs

Dominates A273461.
The one-dimensional case is A005251.

Programs

  • Mathematica
    vdist[v_,w_]:=Total[Abs[v-w]];
    flowdown[prs_]:=Union[prs,With[{ovs=Select[Subsets[prs,{2}],vdist@@#==2&]},Union@@Function[{v,w},Select[Tuples[{Range[Min@@Union[First/@prs],Max@@Union[First/@prs]],Range[Min@@Union[Last/@prs],Max@@Union[Last/@prs]]}],vdist[v,#]==1&&vdist[w,#]==1&]]@@@ovs]];
    Table[Length[Select[Subsets[Tuples[Range[n],2]],flowdown[#]==#&]],{n,0,3}]

Extensions

a(5)-a(6) from Christopher Cormier, Dec 10 2019
a(7)-a(15) from Christopher Cormier, Dec 19 2019

A027667 Number of independent subsets of nodes of 3^n cube (P_3 X ... X P_3).

Original entry on oeis.org

2, 5, 63, 70633, 25090373284177
Offset: 0

Views

Author

Keywords

Examples

			For n=0, the two sets are the empty set and a set containing a single isolated vertex. - _Sean A. Irvine_, Nov 16 2019
		

Crossrefs

Cf. A027624 (P_2), A027668 (P_4).

Extensions

a(0) corrected by Sean A. Irvine, Nov 16 2019

A284707 Number of maximal independent vertex sets in the n-hypercube graph Q_n.

Original entry on oeis.org

1, 2, 2, 6, 42, 1670, 1281402
Offset: 0

Views

Author

Eric W. Weisstein, Apr 01 2017

Keywords

Crossrefs

Cf. A027624 (not necessarily maximal), A366425 (non-isomorphic).

Programs

  • Mathematica
    Table[Length @ FindIndependentVertexSet[HypercubeGraph[n], Infinity, All], {n, 0, 6}] (* Eric W. Weisstein, Jan 01 2024 *)
  • Python
    from networkx import empty_graph, find_cliques
    def A284707(n):
        k = 1<Chai Wah Wu, Jan 11 2024

Formula

a(n) ~ 2*n*2^(N/4) where N = 2^n [Kahn and Park]. - N. J. A. Sloane, Sep 11 2019

A354802 Irregular triangle read by rows where T(n,k) is the number of independent sets of size k in the n-hypercube graph.

Original entry on oeis.org

1, 1, 1, 2, 1, 4, 2, 1, 8, 16, 8, 2, 1, 16, 88, 208, 228, 128, 56, 16, 2, 1, 32, 416, 2880, 11760, 29856, 48960, 54304, 44240, 29920, 17952, 9088, 3672, 1120, 240, 32, 2, 1, 64, 1824, 30720, 342400, 2682432, 15328064, 65515840, 213464240, 538811200, 1070860384, 1708551424, 2245780976, 2517976640, 2509047680
Offset: 0

Views

Author

Christopher Flippen, Jun 06 2022

Keywords

Comments

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)} T(n,k)*t^k.
Since 0 <= k <= alpha(G), row n has length 2^(n-1) + 1 except for n = 0 which has length 2.
Jenssen, Perkins and Potukuchi proved asymptotics for independent sets of given size.

Examples

			Triangle begins:
  n=0: 1, 1
  n=1: 1, 2
  n=2: 1, 4, 2
  n=3: 1, 8, 16, 8, 2
  n=4: 1, 16, 88, 208, 228, 128, 56, 16, 2
The 3-hypercube graph has independence polynomial 1 + 8*t + 16*t^2 + 8*t^3 + 2*t^4.
		

Crossrefs

Cf. A027624 (row sums), A354082 (alternating sums).

Programs

  • Sage
    from sage.graphs.independent_sets import IndependentSets
    def row(n):
        if n == 0:
            g = graphs.CompleteGraph(1)
            setCounts = [0, 0]
        else:
            g = graphs.CubeGraph(n)
            setCounts = [0] * (pow(2,n - 1) + 1)
        for Iset in IndependentSets(g):
            setCounts[len(Iset)] += 1
        return setCounts
    # Christopher Flippen and Scott Taylor, Jun 06 2022

A027668 Number of independent subsets of nodes of 4^n cube (P_4 X ... X P_4).

Original entry on oeis.org

2, 8, 1234, 121039421240
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A027624 (P_2), A027667 (P_3).

Extensions

a(0) corrected by Sean A. Irvine, Nov 16 2019

A290888 Number of independent vertex sets and vertex covers in the n-folded cube graph.

Original entry on oeis.org

3, 5, 31, 393, 177347, 2932100733
Offset: 2

Views

Author

Andrew Howroyd, Aug 15 2017

Keywords

Comments

The independence number of the n-folded cube graphs is given by A058622(n-1).

Crossrefs

Row sums of A355227.

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

Original entry on oeis.org

0, -1, -1, 3, 7, 11, 143, 7715
Offset: 0

Views

Author

Christopher Flippen, Jun 05 2022

Keywords

Comments

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.
Jenssen, Perkins and Potukuchi proved asymptotics for independent sets of given size.
It appears that this sequence remains positive for n > 3.

Examples

			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).
		

Crossrefs

Programs

  • Sage
    from sage.graphs.connectivity import connected_components
    def recurse(g):
        if g.order() == 0:
                return 1
        comp = g.connected_components()
        if len(comp[-1]) == 1:
            return 0
        elif len(comp) > 1:
            prod = 1
            for c in comp:
                if prod == 0:
                    return 0
                else:
                    prod = prod*recurse(g.subgraph(vertices=c))
            return prod
        min_degree_vertex = g.vertices()[0]
        for v in g.vertices():
            if g.degree(v) < g.degree(min_degree_vertex):
                min_degree_vertex = v
        to_remove_edge =  g.edges_incident(min_degree_vertex)[0]
        to_remove_vertices = [to_remove_edge[0], to_remove_edge[1]]
        to_remove_vertices.extend(g.neighbors(to_remove_edge[0]))
        to_remove_vertices.extend(g.neighbors(to_remove_edge[1]))
        to_remove_vertices = list(set(to_remove_vertices))
        without_neighborhoods = copy(g)
        without_edge = copy(g)
        without_neighborhoods.delete_vertices(to_remove_vertices)
        without_edge.delete_edge(to_remove_edge)
        return recurse(without_edge) - recurse(without_neighborhoods)
    def a(n):
        if n == 0:
            return recurse(graphs.CompleteGraph(1))
        else:
            return recurse(graphs.CubeGraph(n))
    # Christopher Flippen and Scott Taylor, Jun 05 2022

A366425 Number of inequivalent maximal independent vertex sets in the n-hypercube graph Q_n.

Original entry on oeis.org

1, 2, 2, 4, 10, 62, 3385
Offset: 0

Views

Author

Dmitry I. Ignatov, Oct 09 2023

Keywords

Comments

a(n) is the number of orbits for the corresponding families of maximal independent vertex sets in the n-hypercube graph Q_n (see also A284707) under the action of the symmetry group S_n.

Examples

			a(0) = 1 since {0} is the only maximal independent vertex set of Q_0, which is the graph consisting of a single vertex labeled 0.
a(1) = 2 since Q_1 = 0---1 has maximal independent vertex sets {0} and {1}, which are inequivalent.
		

Crossrefs

Showing 1-10 of 12 results. Next