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.

User: Nathan Hurtig

Nathan Hurtig's wiki page.

Nathan Hurtig has authored 5 sequences.

A364503 Sprague-Grundy values for Heat-Charge Toggle on paths from A364489 where paths with an even number of vertices are odious, or paths with an odd number of vertices are evil.

Original entry on oeis.org

0, 2, 1, 3, 2, 2, 3, 4, 5, 3, 7, 3, 4, 4, 6, 5, 5, 6, 4, 7, 6, 3, 10, 4, 16, 18, 16, 32, 32, 32, 32, 32, 36, 32, 36, 32, 33, 36, 32, 33, 32, 32, 32, 35, 33, 34, 34, 36, 35, 33, 33, 32, 36, 32, 33, 32, 36, 34, 34, 37, 37, 34
Offset: 1

Keywords

Comments

See A364489 for the rules of Heat-Charge Toggle.

Examples

			a(2) = 2, which is odious. So the second term of A364489 is an even number.
		

References

  • E. R. Berlekamp, J. H. Conway, and R. K. Guy, Winning Ways for Your Mathematical Plays, Vol. 1, CRC Press, 2001.

Crossrefs

Cf. A000069, A001969, A363934. Sprague-Grundy values of A364489.

A364489 Values of n for which the Sprague-Grundy value of Heat-Charge Toggle on an (n+2)-vertex path with initial weights -1,1^n,-1 is evil for odd n or odious for even n.

Original entry on oeis.org

1, 4, 6, 9, 14, 22, 27, 30, 35, 41, 58, 59, 72, 84, 87, 89, 103, 105, 108, 124, 129, 141, 171, 258, 284, 407, 458, 11770548, 25146268, 27690032, 41693544, 55788270, 74838555, 86120064, 89811321, 95580294, 119784327, 139336981, 158776090, 160066751, 161102638, 181691114, 186919128
Offset: 1

Keywords

Comments

Heat-Charge Toggle is an impartial two-player game on a finite simple graph, where each vertex is assigned a weight of -1, 0, or 1.
A Heat-Charge Toggle move consists of selecting a vertex of weight 1 and switching its weight to 0, as well as switching the sign of each of its neighbors: changing 1 to -1, -1 to 1, and keeping 0 at 0.
We additionally only allow moves that strictly decrease the sum of all weights.
The two vertices of degree one have initial weights of -1, while vertices of degree two have an initial weight of 1.

Examples

			For n = 4, the Sprague-Grundy value for a 6-vertex path is 2.
Note that n = 4 is even and 2 is odious (see A000069).
		

References

  • E. R. Berlekamp, J. H. Conway, and R. K. Guy, Winning Ways for Your Mathematical Plays, Vol. 1, CRC Press, 2001.

Crossrefs

Cf. A000069, A001969, A361517, A363934. Paths with Sprague-Grundy values A364503.

A364451 a(n) is the number of trees of diameter 4 with n vertices that are N-games in peg duotaire.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 5, 7, 10, 13, 18, 22, 29, 34, 42, 49, 60, 69, 86, 100, 121, 139, 164, 187, 219, 252, 296, 343, 400, 458, 532, 605, 696, 794, 917, 1050, 1214, 1389, 1599, 1823, 2087, 2371, 2710, 3080, 3521
Offset: 1

Keywords

Comments

Peg duotaire is an impartial normal-play two-player game played on a simple graph, in which each vertex starts with a peg in it. If all vertices have a peg (i.e. the first turn), a move consists of removing some peg from a vertex.
If some vertex does not have a peg, then a move hops one peg over another, landing in an adjacent hole and removing the jumped peg. Formally, it is three vertices x, y, z where x, y are adjacent and y, z are adjacent, and x, y have pegs and z does not. After the move, x, y do not have pegs and z does.
Note than this sequence is always less than or equal to the number of trees of diameter 4 with n vertices, see A000094.

Examples

			There is only one tree of diameter 4 with 5 vertices. It is an N-game, as evidenced by the below winning strategy for the first player. We use 1 to represent a vertex with a peg and 0 otherwise.
   1-1-1-1-1
       |
   1-0-1-1-1
       |     (move is forced)
   1-1-0-0-1
       |
   0-0-1-0-1 (no moves remain)
		

References

  • E. R. Berlekamp, J. H. Conway, and R. K. Guy, Winning Ways for Your Mathematical Plays. Vol. 1, CRC Press, 2001.

Crossrefs

Cf. A000094.

Formula

a(n) <= A000094(n).

A364026 Table read by descending antidiagonals. T(n,k) is the big Ramsey degree of k in w^n, where w is the first transfinite ordinal, omega.

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 4, 1, 1, 0, 1, 26, 14, 1, 1, 0, 1, 236, 509, 49, 1, 1, 0, 1, 2752, 35839, 10340, 175, 1, 1, 0, 1, 39208, 4154652, 5941404, 222244, 637, 1, 1, 0, 1, 660032, 718142257, 7244337796, 1081112575, 4981531, 2353, 1, 1, 0, 1, 12818912, 173201493539
Offset: 0

Author

Nathan Hurtig, Jul 01 2023

Keywords

Comments

T(n,k) is the least integer t such that, for all finite colorings of the k-subsets of w^n, there exists some S, an order-equivalent subset to w^n, where that coloring restricted to the k-subsets of S outputs at most t colors.
By Ramsey's theorem, the first row T(1,k)=1 for all k.
The second row T(2,k) coincides with A000311.
The second column T(n,2) coincides with A079309.

Examples

			The data is organized in a table beginning with row n = 0 and column k = 0. The data is read by descending antidiagonals. T(2,3)=26.
The table T(n,k) begins:
[n/k]   0   1      2        3       4         5   ...
--------------------------------------------------------------------
[0]     1,  1,     0,       0,      0,        0,  ...
[1]     1,  1,     1,       1,      1,        1,  ...
[2]     1,  1,     4,      26,    236,     2572,  ...
[3]     1,  1,    14,     509,  35839,  4154652,  ...
[4]     1,  1,    49,   10340,  ...
[5]     1,  1,   175,  222244,  ...
[6]     1,  1,   637,  ...
		

References

  • Dragan Mašulovic and Branislav Šobot, Countable ordinals and big Ramsey degrees, Combinatorica, 41 (2021), 425-446.
  • Alexander S. Kechris, Vladimir G. Pestov, and Stevo Todorčević, Fraïssé Limits, Ramsey Theory, and topological dynamics of automorphism groups, Geometric & Functional Analysis, 15 (2005), 106-189.

Crossrefs

T(2,k) is A000311. T(n,2) is A079309.

Programs

  • Haskell
    pp p n k
      | n == 0 && k >= 2 = 0
      | k == 0 && p == 0 = 1
      | k == 0 && p >= 1 = 0
      | n == 0 && k == 1 && p == 0 = 1
      | n == 0 && k == 1 && p >= 1 = 0
      | n == 1 && k >= 1 && k == p = 1
      | n == 1 && k >= 1 && k /= p = 0
      | n >= 2 && k >= 1 = sum [binom (p-1) i * pp i (n-1) j * pp (p-1-i) n (k-j) | i <- [0..p-1], j <- [1..k]]
    binom n 0 = 1
    binom 0 k = 0
    binom n k = binom (n-1) (k-1) * n `div` k
    a364026 n k =
      sum [pp p n k | p <- [0..n*k]]

Formula

T(n,k) = Sum_{p=0..n*k} P(p,n,k), where for n >= 2 and k >= 1,
P(0,n,k) = 0, and for p >= 1,
P(p,n,k) = Sum_{j=1..k} Sum_{0..p-1} binomial(p-1,i)*P(i,n-1,j)*P(p-1-i,n,k-j).

A363934 Table read by ascending antidiagonals. T(n,k) is the Sprague-Grundy value for the Heat Toggle game played on an n X k grid where each vertex has initial weight 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 0, 1, 0, 2, 0, 3, 1, 1, 3, 0, 3, 1, 3, 0, 3, 1, 3, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 2, 0, 2, 0, 2, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 3, 2, 2, 3, 1, 1
Offset: 1

Keywords

Comments

Heat Toggle is an impartial two-player game played on a simple graph, where each vertex is assigned a weight of -1 or 1.
A Heat Toggle move consists of selecting a vertex of weight 1 and switching its weight to -1 as well as switching the weight of each of its neighbors, changing 1 to -1 and -1 to 1. We additionally only allow moves that strictly decrease the sum of all weights.
The first row T(1,k) coincides with octal game 0.1337, see A071427.
The second row T(2,k) coincides with the octal game 0.137 (Dawson's Chess), see A002187.

Examples

			The data is organized in a table beginning with row n = 1 and column k = 1. The data is read by ascending antidiagonals. T(2,3)=2.
The table T(n,k) begins:
[n/k]  1   2   3   4   5   6  ...
---------------------------------
[1]    1,  1,  1,  2,  2,  0, ...
[2]    1,  1,  2,  0,  3,  1, ...
[3]    1,  2,  1,  1,  3,  0, ...
[4]    2,  0,  1,  0,  1,  0, ...
[5]    2,  3,  3,  1,  2,  0, ...
[6]    0,  1,  0,  0,  0,  ...
		

References

  • E. R. Berlekamp, J. H. Conway, and R. K. Guy, Winning Ways for Your Mathematical Plays, Vol. 1, CRC Press, 2001.

Crossrefs

Programs

  • Sage
    SG_value_hash = {}
    def MEX(S):
        i = 0
        while True:
            if i not in S:
                return i
            i += 1
    def SG_value(G):
        global SG_value_hash
        SG_value_hash = {}
        ons = set(G.vertices())
        offs = set()
        return SG_value_helper(G, ons, offs)
    def SG_value_helper(G, ons, offs):
        ons_orig = ons.copy()
        offs_orig = offs.copy()
        child_SG_values = set()
        for v in ons_orig:
            vNeighborhood = set(G.neighbors(v))
            neighNowOff = ons_orig.intersection(vNeighborhood)
            neighNowOn = offs_orig.intersection(vNeighborhood)
            if len(neighNowOff) >= len(neighNowOn):
                ons.remove(v)
                offs.add(v)
                ons.update(neighNowOn)
                offs -= neighNowOn
                offs.update(neighNowOff)
                ons -= neighNowOff
                result = -1 # placeholder
                encoded_position = str(offs)
                if encoded_position in SG_value_hash:
                    result = SG_value_hash[encoded_position]
                else:
                    result = SG_value_helper(G, ons, offs)
                SG_value_hash[encoded_position] = result
                ons.add(v)
                offs.remove(v)
                ons -= neighNowOn
                offs.update(neighNowOn)
                offs -= neighNowOff
                ons.update(neighNowOff)
                child_SG_values.add(result)
        return MEX(child_SG_values)
    for sum_of_both in range(2,11):
        antidiagonal = []
        for n in range(1, sum_of_both):
            G = graphs.Grid2dGraph(n, sum_of_both-n)
            antidiagonal.append(SG_value(G))
        print(antidiagonal)