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.

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

This page as a plain text file.
%I A062292 #6 Sep 05 2023 18:52:37
%S A062292 1,8,27,64,125,216,343,512,729,1000,1331,2197,2744,3375,4913,5832,
%T A062292 6859,8000,9261,10648,12167,15625,17576,19683,21952,24389,27000,29791,
%U A062292 35937,42875,50653,54872,59319,64000,68921,74088,79507,85184,91125,97336
%N A062292 A B_2 sequence: a(n) is the smallest cube such that the pairwise sums of {a(1)...a(n)} are all distinct.
%C A062292 A Mian-Chowla sequence consisting only of cubes.
%e A062292 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.
%o A062292 (Python)
%o A062292 from itertools import count, islice
%o A062292 def A062292_gen(): # generator of terms
%o A062292     aset1, aset2, alist = set(), set(), []
%o A062292     for k in (n**3 for n in count(1)):
%o A062292         bset2 = {k<<1}
%o A062292         if (k<<1) not in aset2:
%o A062292             for d in aset1:
%o A062292                 if (m:=d+k) in aset2:
%o A062292                     break
%o A062292                 bset2.add(m)
%o A062292             else:
%o A062292                 yield k
%o A062292                 alist.append(k)
%o A062292                 aset1.add(k)
%o A062292                 aset2.update(bset2)
%o A062292 A062292_list = list(islice(A062292_gen(),30)) # _Chai Wah Wu_, Sep 05 2023
%Y A062292 Cf. A011185, A010672, A025582, A005282, A062294.
%K A062292 nonn
%O A062292 1,2
%A A062292 _Labos Elemer_, Jul 02 2001