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: Philip Thomas

Philip Thomas's wiki page.

Philip Thomas has authored 3 sequences.

A363894 Number of weakly connected components of a halved addsub configuration graph with respect to integers mod n over a path with two vertices.

Original entry on oeis.org

1, 2, 1, 8, 2, 3, 1, 5, 8, 4, 2, 18, 3, 33, 1, 19, 5, 6, 8, 20, 4, 7, 2, 39, 18, 14, 3, 32, 33, 25, 1, 29, 19, 58, 5, 42, 6, 75, 8, 91, 20, 34, 4, 108, 7, 13, 2, 17, 39, 164, 18, 58, 14, 83, 3, 47, 32, 16, 33, 66, 25, 167, 1, 365, 29, 18, 19, 56, 58, 19, 5
Offset: 2

Keywords

Comments

The addsub game is played on a path with two vertices {u,v}. We define a configuration of the integers mod n on {u,v} by assigning weights wt(u) and wt(v).
An addsub move from u to v is a reassignment of weights given by wt(u) -> wt(u) - wt(v) (mod n) and wt(v) -> wt(u) + wt(v) (mod n). An addsub move from v to u (i.e. the backward move) is defined analogously.
The halved addsub configuration graph is the directed subgraph of the addsub configuration graph restricted to the forward move only: wt(u) -> wt(u) - wt(v) (mod n) and wt(v) -> wt(u) + wt(v) (mod n).

References

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

Crossrefs

Programs

  • Mathematica
    Upto=25;
    Table[
      VertexSet:={};
      EdgeSet:={};
      (* Compute configuration graph for integers mod n *)
      Do[
        Do[AppendTo[VertexSet,{i,j}];
          AppendTo[EdgeSet,{i,j}\[DirectedEdge]{Mod[i-j,n],Mod[i+j,n]}],
          {j,0,n-1}],
        {i,0,n-1}];
      (* Print n-th term *)
      Length[WeaklyConnectedComponents[Graph[VertexSet,EdgeSet]]],
      {n,2,Upto}]

A363893 Number of weakly connected components of an addsub configuration graph with respect to integers mod n over a path with two vertices.

Original entry on oeis.org

1, 2, 1, 4, 2, 3, 1, 5, 4, 4, 2, 6, 3, 11, 1, 11, 5, 6, 4, 12, 4, 7, 2, 13, 6, 14, 3, 10, 11, 25, 1, 29, 11, 18, 5, 12, 6, 21, 4, 25, 12, 34, 4, 32, 7, 13, 2, 17, 13, 48, 6, 16, 14, 25, 3, 47, 10, 16, 11, 18, 25, 87, 1, 95, 29, 18, 11, 32, 18, 19, 5
Offset: 2

Keywords

Comments

The addsub game is played on a path with two vertices {u,v}. We define a configuration of the integers mod n on {u,v} by assigning weights wt(u) and wt(v).
An addsub move from u to v is a reassignment of weights given by wt(u) -> wt(u) - wt(v) (mod n) and wt(v) -> wt(u) + wt(v) (mod n). An addsub move from v to u is defined analogously.
The addsub configuration graph with respect to the integers mod n over {u,v} is the directed graph in which each node corresponds to a configuration (wt(u),wt(v)) and a directed edge from a configuration to the resulting configuration is attainable via a single addsub move.

Examples

			For n=3, the (u,v) sequence of addsub moves forms the directed cycle (0,1)->(2,1)->(1,0)->(1,1)->(0,2)->(1,2)->(2,0)->(2,2)->(0,1). The (v,u) sequence of addsub moves forms the directed cycle (0,1)->(1,1)->(2,0)->(2,1)->(0,2)->(2,2)->(1,0)->(1,2)->(0,1). These two directed cycles form one weakly connected component. The isolated vertex (0,0) is a loop and forms the second weakly connected component. Therefore, a(3)=2.
		

References

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

Crossrefs

Programs

  • Mathematica
    Upto=25;
    Table[
      VertexSet:={};
      EdgeSet:={};
      (* Compute configuration graph for integers mod n *)
      Do[
        Do[AppendTo[VertexSet,{i,j}];
          AppendTo[EdgeSet,{i,j}\[DirectedEdge]{Mod[i-j,n],Mod[i+j,n]}];
          AppendTo[EdgeSet,{i,j}\[DirectedEdge]{Mod[j+i,n],Mod[j-i,n]}],
          {j,0,n-1}],
        {i,0,n-1}];
      (* Print n-th term *)
      Length[WeaklyConnectedComponents[Graph[VertexSet,EdgeSet]]],
      {n,2,Upto}]

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