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: Maggie X. Lai

Maggie X. Lai's wiki page.

Maggie X. Lai has authored 2 sequences.

A364237 a(n) is the number of non-equivalent permutations of {1,2,...,2n-1} such that no subset of consecutive terms from the permutation sums to 0 modulo 2n, where two permutations are equivalent if one can be obtained from the other by multiplying every entry with an integer relatively prime to 2n and/or reversing the permutation.

Original entry on oeis.org

1, 1, 2, 4, 42, 504, 7492, 172480, 8639632
Offset: 1

Keywords

Comments

If we consider all permutations of {1,2,...,2n-1} such that no subset of consecutive terms from the permutation sums to 0 modulo 2n, then the number of such permutations is given by the number of constructive orderings mentioned in A141599. For example, given the permutation 14325 that satisfies the given conditions, observe that the partial sums modulo 6, namely 1=1, 1+4=5, 1+4+3=2, 1+4+3+2=4, and 1+4+3+2+5=3, are distinct.

Examples

			When n=3, there are four permutations of {1,2,3,4,5} such that no subset of consecutive terms from the permutation sums to 0 modulo 6, namely 14325, 25314, 41352, and 52341. Note that 14325 and 52341 are equivalent by reversing the permutations. Furthermore multiplication by 5 on every entry also yields the same equivalence. Additionally, 25314 and 41352 are analogously equivalent. Hence a(3)=2.
When n=4, 6142573 and 3752416 are equivalent by reversing the permutations but not by multiplying any integer relatively prime to 8, whereas 6142573 and 2346751 are equivalent by multiplication of 3 on every entry.
		

Crossrefs

Cf. A141599.

Programs

  • SageMath
    n = 3 #the index for the sequence a(n)
    orbits = {} #dictionary of permutations that are consecutive zero-sum-free
    seen = [] #list of seen permutations that are consecutive zero-sum-free
    a = 0 #the value of a(n)
    for labeling in Permutations(range(1,2*n)):
        if labeling not in seen:
            sums = [labeling[0]]
            for i in range(1,2*n-1):
                nextsum = (labeling[i] + sums[i-1]) % (2*n)
                if any([nextsum == 0, nextsum in sums]):
                    break
                sums.append(nextsum)
            if len(sums) == (2*n)-1:
                a += 1
                orbits[a] = []
                for m in [x for x in range(1,2*n) if gcd(x,2*n) == 1]:
                    equiv = [(m*labeling[i]) % (2*n) for i in range(2*n-1)]
                    if equiv not in orbits[a]:
                        orbits[a].append(equiv)
                    seen.append(equiv)
                    equiv = [equiv[2*n-2-i] for i in range(2*n-1)]
                    if equiv not in orbits[a]:
                        orbits[a].append(equiv)
                    seen.append(equiv)
    print(f"a({n}) = {a}\n")
    print("Equivalencies:")
    for i in range(1,a+1):
        print(f"{i}.")
        for x in orbits[i]:
            print(x)
        print('\n')

Extensions

a(8)-a(9) from Sean A. Irvine, Aug 15 2023

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