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: Peter J. Dukes

Peter J. Dukes's wiki page.

Peter J. Dukes has authored 2 sequences.

A349216 Number of ternary triples (u,v,w) with 1 <= u < v < w <= n.

Original entry on oeis.org

0, 0, 1, 2, 4, 8, 13, 20, 30, 40, 53, 70, 88, 110, 137, 166, 200, 240, 281, 328, 382, 438, 501, 572, 646, 728, 819, 910, 1010, 1120, 1233, 1356, 1490, 1628, 1777, 1938, 2100, 2274, 2461, 2652, 2856, 3074, 3297, 3534, 3786, 4040, 4309, 4594, 4884, 5190, 5513, 5842, 6188, 6552, 6917
Offset: 1

Author

Peter J. Dukes, Nov 10 2021

Keywords

Comments

A triple of integers (u,v,w) is a ternary triple if in the ternary expansions of u,v,w, all three disagree at the least significant position at which any two disagree.
Equivalently, (u,v,w) is a ternary triple if the highest power of three dividing 2w-u-v is greater than the highest power of three dividing gcd(w-u,w-v).

Examples

			For n = 7 the 13 ternary triples are (1, 2, 3), (2, 3, 4), (1, 3, 5), (3, 4, 5), (1, 2, 6), (2, 4, 6), (1, 5, 6), (4, 5, 6), (2, 3, 7), (1, 4, 7), (3, 5, 7), (2, 6, 7), (5, 6, 7).
		

Crossrefs

Programs

  • Mathematica
    Array[Sum[Sum[Sum[Boole[IntegerExponent[w + w - u - v, 3] > IntegerExponent[GCD[w - u, w - v], 3]], {u, (v - 1)}], {v, 2, (w - 1)}], {w, 3, #}] &, 55] (* Michael De Vlieger, Feb 15 2022 *)
  • PARI
    A349216(n) = sum(w=3,n,sum(v=2,(w-1),sum(u=1,(v-1),valuation(w+w-u-v,3) > valuation(gcd(w-u,w-v),3)))); \\ Antti Karttunen, Nov 13 2021
    
  • SageMath
    def a(n):
        t=3^ceil(log(n,3))
        counter=0
        for w in range(n):
            for v in range(w):
                for u in range(v):
                    if min(gcd(w-u,3^t),gcd(w-v,3^t))
    				

A246427 Number of facets of the cone defined by the zero-one inclusion matrix of pairs versus triples on an n-set.

Original entry on oeis.org

10, 70, 896, 52367
Offset: 5

Author

Peter J. Dukes, Aug 26 2014

Keywords

Comments

Equivalently, this is the number of integer weightings of the edges of the complete graph K_n which are: (1) nonnegative on all triangles; (2) maximally vanishing on triangles; and (3) have gcd of weights equal to one.
This also gives the degree of each anticut in the metric polytope (see link below) for n points.

Examples

			For n = 5, the 10 facet normals are defined by the choice of a (2,3)-partition.  Weight 2 is assigned to edges within each part and weight -1 is assigned to edges crossing the partition.  Every triangle has weight 0, except for one which inherits weight 6.
		

Crossrefs

Programs

  • Sage
    def A246427(n):
        T = Combinations(range(n),2)
        K = Combinations(range(n),3)
        W = matrix(ZZ,binomial(n,2),binomial(n,3),lambda i,j:Set(T[i]).issubset(Set(K[j])))
        C = Cone(W.transpose())
        return len(C.facet_normals())
    [A246427(n) for n in range(5,8)]