login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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

%I #23 Sep 25 2023 14:33:51

%S 2,3,4,5,9,10,11,16,22,24,28,29,30,37,42,50,55,56,70,73,76,82,89,95,

%T 101,102,115,128,133,135,136,141,142,153,160,161,168,174,181,195,199,

%U 200,214,221,227,233,247,252,265,266,267,273,280,285,286,325,331,332,338

%N 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.

%H David A. Corneth, <a href="/A303600/b303600.txt">Table of n, a(n) for n = 1..10000</a> (Terms 1..100 from David Consiglio, Jr.)

%H David A. Corneth, <a href="/A303600/a303600.gp.txt">PARI-prog</a>

%H Borys Kuca, <a href="https://arxiv.org/abs/1804.09594">Structures in Additive Sequences</a>, arXiv:1804.09594 [math.NT], 2018. See V(2,3).

%t 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 *)

%o (PARI) \\ See PARI link \\ _David A. Corneth_, Apr 27 2018

%o (Python)

%o terms = [2,3]

%o while len(terms) < 100:

%o print(len(terms))

%o options = []

%o for x in range(len(terms)):

%o for y in range(x,len(terms)):

%o options.append(terms[x]+terms[y])

%o for y in sorted(options):

%o if options.count(y) == 1 and y > max(terms):

%o terms.append(y)

%o break

%o for x in range(len(terms)):

%o print(str(x+1)+" "+terms[x])

%o # _David Consiglio, Jr._, Apr 18 2018

%Y Cf. A004280 (with first terms 1 and 2).

%K nonn

%O 1,1

%A _Michel Marcus_, Apr 26 2018

%E More terms from _David Consiglio, Jr._, Apr 26 2018