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.

A062559 A B2 sequence consisting of powers of primes but not primes: a(n) = least value from A025475 such that sequence increases and pairwise sums of distinct elements are all distinct.

Original entry on oeis.org

4, 8, 9, 16, 25, 27, 49, 64, 121, 243, 256, 343, 512, 729, 961, 1024, 1331, 1369, 1849, 2048, 2187, 2197, 2401, 3125, 3481, 4096, 4913, 5329, 6561, 6859, 6889, 8192, 10201, 12769, 14641, 15625, 16384, 16807, 19683, 22201, 22801, 27889, 28561, 29791, 32768
Offset: 0

Views

Author

Labos Elemer, Jul 03 2001

Keywords

Comments

32 is the first prime power > 1 not in this sequence.

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from sympy import factorint
    def A062559_gen(): # generator of terms
        aset2, alist = set(), []
        for k in count(0):
            if len(f:=factorint(k).values()) == 1 and max(f) > 1:
                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)
    A062559_list = list(islice(A062559_gen(),30)) # Chai Wah Wu, Sep 11 2023

Extensions

More terms from Sean A. Irvine, Apr 03 2023