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.

Showing 1-2 of 2 results.

A133096 a(n) = A079848(n) - A062294(n).

Original entry on oeis.org

0, 0, 0, 4, 12, 20, 18, 50, 34, 66, 80, 70, 120, 76, 90, 198, 140, 70, 110, 156, 100, 164, 10, -6, 198, 66, 258, 280, 732, 390, 594, 342, 270, 314, 210, 402, 252, 246, -28, -204, -224, 234, 14, 528, 500, 850, 1110, 942, 1014, 1542, 1906, 1416, 1034, 1454, 970, 982, 1518
Offset: 1

Views

Author

Klaus Brockhaus, Sep 17 2007

Keywords

Comments

A079848 is the sequence of smallest primes such that the pairwise sums of not necessarily distinct elements are all distinct, whereas A062294 is the sequence of smallest primes such that the pairwise sums of distinct elements are all distinct.

Examples

			a(6) = A079848(6) - A062294(6) = 37 - 17 = 20.
		

Crossrefs

Programs

  • Python
    from collections import deque
    from itertools import islice
    from sympy import nextprime
    def A133096_gen(): # generator of terms
        aset2, alist, bset2, blist, aqueue, bqueue, k = set(), [], set(), [], deque(), deque(), 1
        while (k:=nextprime(k)):
            cset2 = set()
            for a in alist:
                if (m:=k-a) 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()
    A133096_list = list(islice(A133096_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
Showing 1-2 of 2 results.