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: Kevin O'Bryant

Kevin O'Bryant's wiki page.

Kevin O'Bryant has authored 23 sequences. Here are the ten most recent ones:

A378623 Number of pairs (u,v) for which there is a set of n positive integers X = {x_1, ..., x_n} with u = |X+X| = #{x_i + x_j : 1 <= i,j <=n} and v = |X*X| = #{x_i * x_j : 1 <= i,j <=n}.

Original entry on oeis.org

1, 1, 3, 10, 27, 69
Offset: 1

Author

Kevin O'Bryant, Dec 02 2024

Keywords

Comments

As 2n-1 <= |X+X|,|X*X| <= n(n+1)/2 by combinatorics, we know that a(n) <= 1/4 (n^2-3n+4)^2 <= 0.25 n^4 - 1.5 n^3 + O(n^2).
In "Visualizing the Sum-Product Conjecture", the bound a(n) <= (1/4)*(24 - 40*n + 27*n^2 - 8*n^3 + n^4) = 0.25 n^4 -2 n^3 +O(n^2) is proved.
From "Visualizing the Sum-Product Conjecture": 153 <= a(7) <= 157, 305 <= a(8) <= 358, 543 <= a(9) <= 645, 914 <= a(10) <= 1081, 1444 <= a(11) <= 1711, 2185 <= a(12) <= 2586, 3198 <= a(13) <= 3763, 4520 <= a(14) <= 5305, 6233 <= a(15) <= 7281, 8400 <= a(16) <= 9766. - Kevin O'Bryant, Mar 10 2025

Examples

			For n=3, the a(3) = 3 pairs are (5,6), (6,6), (6,5).
For n=4, the a(4) = 10 pairs are (u,10), (u,9), (10,8), (10,7), where 7 <= u <= 10.
		

A378609 Number of weak orderings of (i,j), 1 <= i,j <= n, for which there is a set X = {x_1<...

Original entry on oeis.org

1, 1, 3, 25, 477, 18403
Offset: 1

Author

Kevin O'Bryant, Dec 01 2024

Keywords

Comments

Number of weak orderings of (i,j), 1<=i,j<=n, for which there is a set X={x_1<...
Number of weak orderings of (i,j), 1<=i,j<=n, for which there is a set X={x_1<...

Examples

			For n=3 the three weak orderings are: 11<12=21<13=31=22<23=32<33, 11<12=21<22<13=31<23=32<33, and 11<12=21<13=31<22<23=32<33, which arise from the sets {1,2,3}, {1,2,4}, and {1,3,4}, respectively.
For n=4, there are 39 weak orderings, but only 25 arise from sets of real numbers. For example, the weak ordering 11<12=21<13=31<22<14=41=23=32<24=42=33<34=43<44 does not arise from any set of real numbers.
		

Crossrefs

Cf. A376162.

Formula

a(n) <= A376162(n).

A376162 Number of ordered partitions of S={(i,j):1 <= i , j <= n} where for every i and j the pairs (i+1,j) and (i,j+1) are in a later part than the part containing the pair (i,j), and the pairs (i,j), (j,i) are in the same part.

Original entry on oeis.org

1, 1, 3, 39, 2905, 1538369, 6904262355, 304662492057063, 150347237334006997801, 929721796071361437087789041, 79773595676787229793797978773561927, 104165556509336140832819242491033872033130063, 2252283824141388832759484222915451435885285752729087857
Offset: 1

Author

Kevin O'Bryant, Sep 12 2024

Keywords

Comments

Ordered partitions are also called weak orderings.
Any such ordered partition can be written as a list of pairs (i,j) with 1 <= i <= j <= n, with either "=" or "<" between each pair, and so that (i,j) appears in the list before (i+1,j) (if i
Given any set A={a_1<...
Given any set A={a_1<...
Equivalently, a(n) is the number of n X n symmetric matrices whose values cover an initial interval of positive integers and whose rows have values which are strictly increasing. - Andrew Howroyd, Sep 15 2024

Examples

			For n=2 the a(2)=1 ordered partition is {(1,1)}<{(2,1),(1,2)}<{(2,2)}. We can encode this as 11<12<22, writing "ij" for the pair (i,j).
For n=3 one of the a(3)=3 ordered partitions is {(1,1)}<{(1,2),(2,1)}<{(1,3),(3,1),(2,2)}<{(2,3),(3,2)}<{(3,3)}, which is encoded as either 11<12<13=22<23<33 or 11<12<22=13<23<33. The other two ordered partitions can be encoded as 11<12<22<13<23<33 and 11<12<13<22<23<33.
From _Andrew Howroyd_, Sep 15 2024: (Start)
The a(3) = 3 symmetric matrices are:
    [1 2 3]   [1 2 3]   [1 2 4]
    [2 3 4]   [2 4 5]   [2 3 5]
    [3 4 5]   [3 5 6]   [4 5 6]
(End)
		

Crossrefs

Programs

Formula

a(n) <= A000670(n*(n+1)/2).

Extensions

a(7) onwards from Andrew Howroyd, Sep 15 2024

A369819 The seventh term of the greedy B_n set of natural numbers.

Original entry on oeis.org

6, 30, 124, 368, 926, 2214, 4181, 8043, 13818, 23614, 34825, 54011, 84026, 109870, 156474, 217790, 304910, 376260, 510220, 667130, 794873, 1008048, 1302947, 1629264, 1916949, 2361150, 2859694, 3467661, 3989744, 4779270, 5479857, 6449983, 7575912
Offset: 1

Author

Kevin O'Bryant, Feb 03 2024

Keywords

Comments

Proved in arXiv:2312.10910 that a(n) <= 0.382978*n^5 + O(n^4).

Examples

			a(2) = 30, as all 28 nonincreasing sums from {0,1,3,7,12,20,30}, namely 0+0 < 0+1 < 1+1 < ... < 7+20 < 0+30 < 1+30 < 12+20 <3+30 < 7+30 < 20+20 < 12+30 < 20+30 < 30+30, are distinct, and all other 7-element sets of nonnegative integers with this property are lexicographically after {0,1,3,7,12,20,30}.
		

Crossrefs

Column 7 of A365515.

Programs

  • Python
    # uses Python code from A369818
    from itertools import count, combinations_with_replacement
    def A369819(n):
        alist = [0,1,n+1,n*(n+1)+1,(n+3>>1)*n**2+(3*n+2>>1),A369818(n)]
        aset = set(sum(d) for d in combinations_with_replacement(alist,n))
        blist = []
        for i in range(n):
            blist.append(set(sum(d) for d in combinations_with_replacement(alist,i)))
        for k in count(alist[-1]+1):
            for i in range(n):
                if any((n-i)*k+d in aset for d in blist[i]):
                    break
            else:
                return k # Chai Wah Wu, Feb 28 2024

A369817 The fifth term of the greedy B_n set of natural numbers.

Original entry on oeis.org

4, 12, 32, 55, 108, 154, 256, 333, 500, 616, 864, 1027, 1372, 1590, 2048, 2329, 2916, 3268, 4000, 4431, 5324, 5842, 6912, 7525, 8788, 9504, 10976, 11803, 13500, 14446, 16384, 17457, 19652, 20860, 23328, 24679, 27436, 28938, 32000, 33661, 37044, 38872, 42592, 44595, 48668, 50854, 55296, 57673, 62500, 65076
Offset: 1

Author

Kevin O'Bryant, Feb 02 2024

Keywords

Comments

{0, 1, n+1, n^2+n+1, a(n)} is the lexicographically first set of 5 nonnegative integers with the property that the sum of any n nondecreasing terms (repetitions allowed) is unique.

Examples

			a(2) = 12, as all 15 nonincreasing sums from {0,1,3,7,12}, namely 0+0 < 0+1 < 1+1 < 0+3 < 1+3 < 3+3 < 0+7 < 1+7 < 3+7 < 0+12 < 1+12 < 7+7 < 3+12 < 7+12 < 12+12, are distinct, and all other 5-element sets of nonnegative integers with this property are lexicographically after {0,1,3,7,12}.
		

Crossrefs

Column 5 of A365515.

Programs

  • Mathematica
    a[n_] := Floor[(n + 3)/2] n^2 + Floor[(3 n + 2)/2]
  • Python
    def A369817(n): return (n+3>>1)*n**2+(3*n+2>>1) # Chai Wah Wu, Feb 28 2024

Formula

a(n) = floor((n + 3)/2) * n^2 + floor((3*n + 2)/2), proved in arXiv:2311.14021.
G.f.: x*(-x^6 + x^5 + 5*x^4 - x^3 + 8*x^2 + 8*x + 4)/((x - 1)*(x^2 - 1)^3). - Chai Wah Wu, Feb 28 2024
E.g.f.: ((2 + 7*x + 5*x^2 + x^3)*cosh(x) + (1 + 6*x + 6*x^2 + x^3)*sinh(x) - 2)/2. - Stefano Spezia, Mar 09 2024

A369818 The sixth term of the greedy B_n set of natural numbers.

Original entry on oeis.org

5, 20, 71, 153, 366, 668, 1153, 1822, 3119, 4448, 6348, 8559, 11565, 14976, 21023, 26220, 33066, 40306, 49601, 59354, 76031, 89248, 106008, 122909, 143989, 165196, 200759, 227660, 261030, 293736, 333825, 373110, 438191, 485952, 544356, 600523, 668573, 734072, 841679, 918988, 1012578, 1101374, 1208065, 1309426, 1474943, 1592000, 1732656
Offset: 1

Author

Kevin O'Bryant, Feb 03 2024

Keywords

Comments

{0, 1, n+1, n^2+n+1, A369817(n), a(n)} is the lexicographically first set of 6 nonnegative integers with the property that the sum of any n nondecreasing terms (repetitions allowed) is unique.

Examples

			a(2) = 20, as all 21 nonincreasing sums from {0,1,3,7,12,20}, namely 0+0 < 0+1 < 1+1 < 0+3 < 1+3 < 3+3 < 0+7 < 1+7 < 3+7 < 0+12 < 1+12 < 7+7 < 3+12 < 7+12 < 0+20 < 1+20 < 3+20 < 12+12 < 7+20 < 12+20 < 20+20, are distinct, and all other 6-element sets of nonnegative integers with this property are lexicographically after {0,1,3,7,12,20}.
		

Crossrefs

Column 6 of A365515.
Cf. A369817.

Programs

  • Python
    from itertools import count, combinations_with_replacement
    def A369818(n):
        alist = [0,1,n+1,n*(n+1)+1,(n+3>>1)*n**2+(3*n+2>>1)]
        aset = set(sum(d) for d in combinations_with_replacement(alist,n))
        blist = []
        for i in range(n):
            blist.append(set(sum(d) for d in combinations_with_replacement(alist,i)))
        for k in count(max(alist[-1]+1,(n**3>>1)*(1+(n>>2)))):
            for i in range(n):
                if any((n-i)*k+d in aset for d in blist[i]):
                    break
            else:
                return k # Chai Wah Wu, Feb 28 2024

Formula

Conjectured that a(6n+i) is a quartic polynomial sequence with lead term (1/3)n^4 for each i in {1,2,3,5,6,10} in arxiv:2312.10910.
Proved that (1/8)*n^4 + (1/2)*n^3 <= a(n) <= 0.406671*n^4 + O(n^3) in arxiv:2312.10910.

A365304 a(n) is the smallest nonnegative integer such that the sum of any eight ordered terms a(k), k<=n (repetitions allowed), is unique.

Original entry on oeis.org

0, 1, 9, 73, 333, 1822, 8043, 28296, 102042, 338447, 1054824, 2569353, 6237718, 15947108, 36179796
Offset: 1

Author

Kevin O'Bryant, Aug 31 2023

Keywords

Comments

This is the greedy B_8 sequence.

Examples

			a(4) != 70 because 70+1+1+0+0+0+0+0 = 9+9+9+9+9+9+9+0.
		

Crossrefs

Programs

  • Python
    def GreedyBh(h, seed, stopat):
        A = [set() for _ in range(h+1)]
        A[1] = set(seed)    # A[i] will hold the i-fold sumset
        for j in range(2,h+1): # {2,...,h}
            for x in A[1]:
                A[j].update([x+y for y in A[j-1]])
        w = max(A[1])+1
        while w <= stopat:
            wgood = True
            for k in range(1,h):
                if wgood:
                    for j in range(k+1,h+1):
                        if wgood and (A[j].intersection([(j-k)*w + x for x in A[k]]) != set()):
                            wgood = False
            if wgood:
                A[1].add(w)
                for k in range(2,h+1): # update A[k]
                    for j in range(1,k):
                        A[k].update([(k-j)*w + x for x in A[j]])
            w += 1
            return A[1]
    GreedyBh(8,[0],10000)
    
  • Python
    from itertools import count, islice, combinations_with_replacement
    def A365304_gen(): # generator of terms
        aset, alist = set(), []
        for k in count(0):
            bset = set()
            for d in combinations_with_replacement(alist+[k],7):
                if (m:=sum(d)+k) in aset:
                    break
                bset.add(m)
            else:
                yield k
                alist.append(k)
                aset |= bset
    A365304_list = list(islice(A365304_gen(),10)) # Chai Wah Wu, Sep 01 2023

Extensions

a(11)-a(15) from Chai Wah Wu, Sep 13 2023

A365303 a(n) is the smallest nonnegative integer such that the sum of any seven ordered terms a(k), k<=n (repetitions allowed), is unique.

Original entry on oeis.org

0, 1, 8, 57, 256, 1153, 4181, 14180, 47381, 115267, 307214, 737909, 1682367, 3850940, 8557010, 18311575, 37925058, 61662056
Offset: 1

Author

Kevin O'Bryant, Aug 31 2023

Keywords

Comments

This is the greedy B_7 sequence.

Examples

			a(3) != 7 because 7+0+0+0+0+0+0 = 1+1+1+1+1+1+1.
		

Crossrefs

Programs

  • Python
    def GreedyBh(h, seed, stopat):
        A = [set() for _ in range(h+1)]
        A[1] = set(seed)    # A[i] will hold the i-fold sumset
        for j in range(2,h+1): # {2,...,h}
            for x in A[1]:
                A[j].update([x+y for y in A[j-1]])
        w = max(A[1])+1
        while w <= stopat:
            wgood = True
            for k in range(1,h):
                if wgood:
                    for j in range(k+1,h+1):
                        if wgood and (A[j].intersection([(j-k)*w + x for x in A[k]]) != set()):
                            wgood = False
            if wgood:
                A[1].add(w)
                for k in range(2,h+1): # update A[k]
                    for j in range(1,k):
                        A[k].update([(k-j)*w + x for x in A[j]])
            w += 1
            return A[1]
    GreedyBh(7,[0],10000)
    
  • Python
    from itertools import count, islice, combinations_with_replacement
    def A365303_gen(): # generator of terms
        aset, alist = set(), []
        for k in count(0):
            bset = set()
            for d in combinations_with_replacement(alist+[k],6):
                if (m:=sum(d)+k) in aset:
                    break
                bset.add(m)
            else:
                yield k
                alist.append(k)
                aset |= bset
    A365303_list = list(islice(A365303_gen(),10)) # Chai Wah Wu, Sep 01 2023

Extensions

a(13)-a(18) from Chai Wah Wu, Sep 13 2023

A365305 a(n) is the smallest nonnegative integer such that the sum of any nine ordered terms a(k), k<=n (repetitions allowed), is unique.

Original entry on oeis.org

0, 1, 10, 91, 500, 3119, 13818, 59174, 211135, 742330, 2464208, 7616100, 19241477, 56562573
Offset: 1

Author

Kevin O'Bryant, Aug 31 2023

Keywords

Comments

This is the greedy B_9 sequence.

Examples

			a(4) != 72 because 72+1+1+1+1+1+1+1+1+0 = 10+10+10+10+10+10+10+10+0.
		

Crossrefs

Programs

  • Python
    def GreedyBh(h, seed, stopat):
        A = [set() for _ in range(h+1)]
        A[1] = set(seed)    # A[i] will hold the i-fold sumset
        for j in range(2,h+1): # {2,...,h}
            for x in A[1]:
                A[j].update([x+y for y in A[j-1]])
        w = max(A[1])+1
        while w <= stopat:
            wgood = True
            for k in range(1,h):
                if wgood:
                    for j in range(k+1,h+1):
                        if wgood and (A[j].intersection([(j-k)*w + x for x in A[k]]) != set()):
                            wgood = False
            if wgood:
                A[1].add(w)
                for k in range(2,h+1): # update A[k]
                    for j in range(1,k):
                        A[k].update([(k-j)*w + x for x in A[j]])
            w += 1
            return A[1]
    GreedyBh(9,[0],10000)
    
  • Python
    from itertools import count, islice, combinations_with_replacement
    def A365305_gen(): # generator of terms
        aset, alist = set(), []
        for k in count(0):
            bset = set()
            for d in combinations_with_replacement(alist+[k],8):
                if (m:=sum(d)+k) in aset:
                    break
                bset.add(m)
            else:
                yield k
                alist.append(k)
                aset |= bset
    A365305_list = list(islice(A365305_gen(),10)) # Chai Wah Wu, Sep 01 2023

Extensions

a(11)-a(14) from Chai Wah Wu, Sep 13 2023

A365302 a(n) is the smallest nonnegative integer such that the sum of any six ordered terms a(k), k<=n (repetitions allowed), is unique.

Original entry on oeis.org

0, 1, 7, 43, 154, 668, 2214, 6876, 16864, 41970, 94710, 202027, 429733, 889207, 1549511, 3238700, 5053317, 8502061, 15583775, 25070899, 40588284, 63604514
Offset: 1

Author

Kevin O'Bryant, Aug 31 2023

Keywords

Comments

This is the greedy B_6 sequence.

Examples

			a(5) != 50 because 50+1+1+1+1+0 = 43+7+1+1+1+1.
		

Crossrefs

Programs

  • Python
    def GreedyBh(h, seed, stopat):
        A = [set() for _ in range(h+1)]
        A[1] = set(seed)    # A[i] will hold the i-fold sumset
        for j in range(2,h+1): # {2,...,h}
            for x in A[1]:
                A[j].update([x+y for y in A[j-1]])
        w = max(A[1])+1
        while w <= stopat:
            wgood = True
            for k in range(1,h):
                if wgood:
                    for j in range(k+1,h+1):
                        if wgood and (A[j].intersection([(j-k)*w + x for x in A[k]]) != set()):
                            wgood = False
            if wgood:
                A[1].add(w)
                for k in range(2,h+1): # update A[k]
                    for j in range(1,k):
                        A[k].update([(k-j)*w + x for x in A[j]])
            w += 1
            return A[1]
    GreedyBh(6,[0],10000)
    
  • Python
    from itertools import count, islice, combinations_with_replacement
    def A365302_gen(): # generator of terms
        aset, alist = set(), []
        for k in count(0):
            bset = set()
            for d in combinations_with_replacement(alist+[k],5):
                if (m:=sum(d)+k) in aset:
                    break
                bset.add(m)
            else:
                yield k
                alist.append(k)
                aset |= bset
    A365302_list = list(islice(A365302_gen(),10)) # Chai Wah Wu, Sep 01 2023

Extensions

a(15)-a(19) from Chai Wah Wu, Sep 01 2023
a(20)-a(22) from Chai Wah Wu, Sep 09 2023