|
|
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.
|
|
0
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
32 is the first prime power > 1 not in this sequence.
|
|
LINKS
|
|
|
PROG
|
(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)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|