A062292 A B_2 sequence: a(n) is the smallest cube such that the pairwise sums of {a(1)...a(n)} are all distinct.
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
Keywords
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.
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
Comments