%I M3746 #30 Mar 13 2023 08:41:06
%S 1,5,6,7,8,9,10,12,20,22,23,24,26,38,39,40,41,52,57,69,70,71,82,87,98,
%T 102,113,119,129,130,133,144,160,161,162,163,175,196,205,208,209,222,
%U 223,224,226,237,253,254,255,256,268,269,270,271,272,284,285,286,303,318
%N a(n) is smallest number which is uniquely of the form a(j) + a(k) with 1 <= j < k < n and a(1) = 1, a(2) = 5.
%C An Ulam-type sequence - see A002858 for many further references, comments, etc.
%D R. K. Guy, "s-Additive sequences", preprint, 1994.
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H T. D. Noe, <a href="/A003667/b003667.txt">Table of n, a(n) for n = 1..10000</a>
%H S. R. Finch, <a href="http://www.emis.de/journals/EM/">Patterns in 1-additive sequences</a>, Experimental Mathematics 1 (1992), 57-63.
%H R. K. Guy, <a href="/A007300/a007300.pdf">s-Additive sequences</a>, Preprint, 1994. (Annotated scanned copy)
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/UlamSequence.html">Ulam Sequence</a>
%t Nest[Append[#, SelectFirst[Union@ Select[Tally@ Map[Total, Select[Permutations[#, {2}], #1 < #2 & @@ # &]], Last@ # == 1 &][[All, 1]], Function[k, FreeQ[#, k]]]] &, {1, 5}, 58] (* _Michael De Vlieger_, Nov 16 2017 *)
%o (Haskell)
%o a003667 n = a003667_list !! (n-1)
%o a003667_list = 1 : 5 : ulam 2 5 a003667_list
%o -- Function ulam as defined in A002858.
%o -- _Reinhard Zumkeller_, Nov 03 2011
%K nonn
%O 1,2
%A _N. J. A. Sloane_, _Mira Bernstein_
%E Name clarfied by _David A. Corneth_, Mar 13 2023
|