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.

Previous Showing 11-20 of 22 results. Next

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

Views

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

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

Views

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

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

Views

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

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

Views

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

A062295 A B_2 sequence: a(n) is the smallest square such that pairwise sums of not necessarily distinct elements are all distinct.

Original entry on oeis.org

1, 4, 9, 16, 25, 36, 64, 81, 100, 169, 256, 289, 441, 484, 576, 625, 841, 1089, 1296, 1444, 1936, 2025, 2401, 2601, 3136, 4225, 4356, 4624, 5329, 5476, 5776, 6084, 7569, 9025, 10201, 11449, 11664, 12321, 12996, 13456, 14400, 16129, 17956, 20164, 22201
Offset: 1

Views

Author

Labos Elemer, Jul 02 2001

Keywords

Examples

			36 is in the sequence since the pairwise sums of {1, 4, 9, 16, 25, 36} are all distinct: 2, 5, 8, 10, 13, 17, 18, 20, 25, 26, 29, 32, 34, 37, 40, 41, 45, 50, 52, 61, 72.
49 is not in the sequence since 1 + 49 = 25 + 25.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def A062295_gen(): # generator of terms
        aset1, aset2, alist = set(), set(), []
        for k in (n**2 for n in count(1)):
            bset2 = {k<<1}
            if (k<<1) not in aset2:
                for d in aset1:
                    if (m:=d+k) in aset2:
                        break
                    bset2.add(m)
                else:
                    yield k
                    alist.append(k)
                    aset1.add(k)
                    aset2 |= bset2
    A062295_list = list(islice(A062295_gen(),30)) # Chai Wah Wu, Sep 05 2023

Extensions

Edited, corrected and extended by Klaus Brockhaus, Sep 24 2007

A034757 a(1)=1, a(n) = smallest odd number such that all sums of pairs of (not necessarily distinct) terms in the sequence are distinct.

Original entry on oeis.org

1, 3, 7, 15, 25, 41, 61, 89, 131, 161, 193, 245, 295, 363, 407, 503, 579, 721, 801, 949, 1129, 1185, 1323, 1549, 1643, 1831, 1939, 2031, 2317, 2623, 2789, 3045, 3143, 3641, 3791, 4057, 4507, 4757, 5019, 5559, 5849, 6309, 6707, 7181, 7593
Offset: 1

Views

Author

Wouter Meeussen, Jun 01 2000

Keywords

Comments

a(1) = 1, a(n) = least number such that every difference a(i)-a(j) is a distinct even number. - Amarnath Murthy, Apr 07 2004

Examples

			5 is not in the sequence since 5+1 is already obtainable from 3+3, 9 is excluded since 1, 3 and 7 are in the sequence and would collide with 1+9
		

Crossrefs

Partial sums of A287178.

Programs

  • Haskell
    a034757 = (subtract 1) . (* 2) . a005282  -- Reinhard Zumkeller, Dec 18 2012
    
  • Mathematica
    seq2={1, 3}; Do[le=Length[seq2]; t=Last[seq2]+2; While[Length[Expand[(Plus @@ (x^seq2) + x^t)^2]] < Pochhammer[3, le]/le!, t=t+2]; AppendTo[seq2, t], {20}]; Print@seq2
  • Python
    from itertools import count, islice
    def A034757_gen(): # generator of terms
        aset1, aset2, alist = set(), set(), []
        for k in count(1,2):
            bset2 = {k<<1}
            if (k<<1) not in aset2:
                for d in aset1:
                    if (m:=d+k) in aset2:
                        break
                    bset2.add(m)
                else:
                    yield k
                    alist.append(k)
                    aset1.add(k)
                    aset2.update(bset2)
    A034757_list = list(islice(A034757_gen(),30)) # Chai Wah Wu, Sep 05 2023

Formula

a(n) = 2*A005282(n)-1. (David Wasserman)

Extensions

An incorrect comment from Amarnath Murthy, also dated Apr 07 2004, has been deleted.
Offset fixed by Reinhard Zumkeller, Dec 18 2012

A062294 A B_2 sequence: a(n) is the smallest prime such that the pairwise sums of distinct elements are all distinct.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 29, 47, 67, 83, 131, 163, 233, 307, 397, 443, 617, 727, 809, 941, 1063, 1217, 1399, 1487, 1579, 1931, 2029, 2137, 2237, 2659, 2777, 3187, 3659, 3917, 4549, 4877, 5197, 5471, 5981, 6733, 7207, 7349, 8039, 8291, 8543, 9283, 9689, 10037
Offset: 1

Views

Author

Labos Elemer, Jul 02 2001

Keywords

Crossrefs

Programs

  • Python
    from itertools import islice
    from sympy import nextprime
    def A062294_gen(): # generator of terms
        aset2, alist, k = set(), [], 0
        while (k:=nextprime(k)):
            bset2 = set()
            for a in alist:
                if (b:=a+k) in aset2:
                    break
                bset2.add(b)
            else:
                yield k
                alist.append(k)
                aset2.update(bset2)
    A062294_list = list(islice(A062294_gen(),30)) # Chai Wah Wu, Sep 11 2023

Extensions

Edited, corrected and extended by Klaus Brockhaus, Sep 17 2007

A133097 a(n) = A005282(n) - A011185(n-1).

Original entry on oeis.org

0, 0, 1, 3, 5, 8, 10, 15, 27, 28, 23, 28, 20, 30, 22, 40, 32, 45, 27, 62, 89, 62, 116, 167, 105, 118, 108, 51, 99, 151, 88, 137, 137, 265, 174, 195, 320, 321, 249, 283, 226, 281, 293, 394, 465, 369, 585, 565, 639, 404, 483, 221, 233, 428, 384, 370, 527, 431, 818
Offset: 1

Views

Author

Klaus Brockhaus, Sep 17 2007

Keywords

Comments

Also A025582(n) - A010672(n-1).
A005282 is the sequence of smallest numbers such that the pairwise sums of not necessarily distinct elements are all distinct, whereas A011185 is the sequence of smallest numbers such that the pairwise sums of distinct elements are all distinct.
Sequence has negative terms; the first one is a(65) = -130.

Examples

			a(6) = A005282(6) - A011185(6) = 21 - 13 = 8.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from collections import deque
    def A133097_gen(): # generator of terms
        aset2, alist, bset2, blist, aqueue, bqueue = set(), [], set(), [], deque(), deque()
        for k in count(1):
            cset2 = {k<<1}
            if (k<<1) not in aset2:
                for a in alist:
                    if (m:=a+k) in aset2:
                        break
                    cset2.add(m)
                else:
                    aqueue.append(k)
                    alist.append(k)
                    aset2.update(cset2)
            cset2 = set()
            for b in blist:
                if (m:=b+k) in bset2:
                    break
                cset2.add(m)
            else:
                bqueue.append(k)
                blist.append(k)
                bset2.update(cset2)
            if len(aqueue) > 0 and len(bqueue) > 0:
                yield aqueue.popleft()-bqueue.popleft()
    A133097_list = list(islice(A133097_gen(),30)) # Chai Wah Wu, Sep 11 2023

A062292 A B_2 sequence: a(n) is the smallest cube such that the pairwise sums of {a(1)...a(n)} are all distinct.

Original entry on oeis.org

1, 8, 27, 64, 125, 216, 343, 512, 729, 1000, 1331, 2197, 2744, 3375, 4913, 5832, 6859, 8000, 9261, 10648, 12167, 15625, 17576, 19683, 21952, 24389, 27000, 29791, 35937, 42875, 50653, 54872, 59319, 64000, 68921, 74088, 79507, 85184, 91125, 97336
Offset: 1

Views

Author

Labos Elemer, Jul 02 2001

Keywords

Comments

A Mian-Chowla sequence consisting only of cubes.

Examples

			During recursive construction of this set, for n=1-50, the cubes of 12,18,24,32,34,36,48 are left out to keep all sums of distinct cubes distinct from each other.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def A062292_gen(): # generator of terms
        aset1, aset2, alist = set(), set(), []
        for k in (n**3 for n in count(1)):
            bset2 = {k<<1}
            if (k<<1) not in aset2:
                for d in aset1:
                    if (m:=d+k) in aset2:
                        break
                    bset2.add(m)
                else:
                    yield k
                    alist.append(k)
                    aset1.add(k)
                    aset2.update(bset2)
    A062292_list = list(islice(A062292_gen(),30)) # Chai Wah Wu, Sep 05 2023

A080222 Record-setting differences between adjacent elements of the Mian-Chowla sequence A005282.

Original entry on oeis.org

1, 2, 4, 5, 8, 10, 14, 21, 26, 34, 48, 71, 74, 90, 113, 143, 153, 249, 270, 299, 346, 453, 535, 940, 1052, 1226, 1347, 1365, 2443, 2511, 4253, 4254, 6116, 7339, 8898, 13621, 15567, 17940, 21061, 21307, 25558, 35749, 39437, 46664, 62709
Offset: 1

Views

Author

Hugo Pfoertner, Feb 07 2003

Keywords

Examples

			a(12)=71 because A005282(17)-A005282(16)=361-290=71 is greater than all previous differences. a(45)=A005282(619)-A005282(618)=3738616-3675907=62709
		

References

Crossrefs

Previous Showing 11-20 of 22 results. Next