|
|
A303600
|
|
a(1)=2 and a(2)=3, then a(n+1) is the smallest integer larger than a(n) that can be written as the sum of two (not necessarily distinct) earlier terms in exactly one way.
|
|
2
|
|
|
2, 3, 4, 5, 9, 10, 11, 16, 22, 24, 28, 29, 30, 37, 42, 50, 55, 56, 70, 73, 76, 82, 89, 95, 101, 102, 115, 128, 133, 135, 136, 141, 142, 153, 160, 161, 168, 174, 181, 195, 199, 200, 214, 221, 227, 233, 247, 252, 265, 266, 267, 273, 280, 285, 286, 325, 331, 332, 338
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
MATHEMATICA
|
Nest[Append[#, Function[{m, s}, First@ SelectFirst[Tally[s], And[First@ # > m, Last@ # < 3] &]] @@ {Max@ #, Sort[Total /@ Tuples[#, {2}]]}] &, {2, 3}, 57] (* Michael De Vlieger, Apr 27 2018 *)
|
|
PROG
|
(Python)
terms = [2, 3]
while len(terms) < 100:
print(len(terms))
options = []
for x in range(len(terms)):
for y in range(x, len(terms)):
options.append(terms[x]+terms[y])
for y in sorted(options):
if options.count(y) == 1 and y > max(terms):
terms.append(y)
break
for x in range(len(terms)):
print(str(x+1)+" "+terms[x])
|
|
CROSSREFS
|
Cf. A004280 (with first terms 1 and 2).
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|