login
A096772
A B3-sequence: a(1) = 1; for n>1, a(n) = smallest number > a(n-1) such that the sums of any three terms are all distinct.
2
1, 2, 5, 14, 33, 72, 125, 219, 376, 573, 745, 1209, 1557, 2442, 3098, 4048, 5298, 6704, 7839, 10987, 12332, 15465, 19144, 24546, 28974, 34406, 37769, 45864, 50877, 61372, 68303, 77918, 88545, 101917, 122032, 131625, 148575, 171237, 197815, 201454
OFFSET
1,2
COMMENTS
This is the B3-sequence analog of the Mian-Chowla B2-sequence (A005282): Let a(1)=1; then use the greedy algorithm to choose the smallest a(n) > a(n-1) such that all sums a(i) + a(j) + a(k) are distinct for 1 <= i <= j <= k <= n. The reciprocal sum of the sequence for the first forty terms is 1.837412....
LINKS
Eric Weisstein's World of Mathematics, B2-Sequence.
Eric Weisstein's World of Mathematics, Mian-Chowla Sequence.
FORMULA
a(n) = A051912(n-1) + 1. - Peter Kagey, Oct 20 2021
PROG
(Python)
from itertools import count, islice
def A096772_gen(): # generator of terms
aset1, aset2, aset3, alist = set(), set(), set(), []
for k in count(1):
bset2, bset3 = {k<<1}, {3*k}
if 3*k not in aset3:
for d in aset1:
if (m:=d+(k<<1)) in aset3:
break
bset2.add(d+k)
bset3.add(m)
else:
for d in aset2:
if (m:=d+k) in aset3:
break
bset3.add(m)
else:
yield k
alist.append(k)
aset1.add(k)
aset2 |= bset2
aset3 |= bset3
A096772_list = list(islice(A096772_gen(), 30)) # Chai Wah Wu, Sep 05 2023
CROSSREFS
Row 3 of A347570.
Cf. A005282 (Mian-Chowla B2-sequence). A051912.
Sequence in context: A296502 A036681 A125615 * A090803 A018015 A080039
KEYWORD
nonn
AUTHOR
Rick L. Shepherd, Aug 15 2004
STATUS
approved