%I M0506 #33 Apr 21 2019 11:03:14
%S 1,2,3,4,5,6,8,10,12,15,17,19,29,31,33,43,44,47,51,54,58,68,69,78,79,
%T 86,95,99,110,113,117,133,134,135,145,151,156,159,173,180,183,193,197,
%U 204,211,229,232,236,239,243,250,256,264,270,281,284
%N For n > 4, a(n) is the least integer > a(n-1) with precisely two representations a(n) = a(i) + a(j), 1 <= i < j < n; and a(n) = n for n=1..4.
%C First differs from A060470 at a(13) = 29. - _Peter Munn_, Dec 10 2017
%D S. R. Finch, Mathematical Constants, Cambridge, 2003, pp. 145-151.
%D R. K. Guy, Unsolved Problems in Number Theory, Section C4.
%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="/A003044/b003044.txt">Table of n, a(n) for n = 1..5440</a>
%H Steven R. Finch, <a href="/FinchSadd.html">Ulam s-Additive Sequences</a> [From Steven Finch, Apr 20 2019]
%H R. Queneau, <a href="http://dx.doi.org/10.1016/0097-3165(72)90083-0">Sur les suites s-additives</a>, J. Combin. Theory, A12 (1972), 31-71. Queneau left out 44.
%t a[n_ /; n <= 4] = n; a[n_] := a[n] = Catch[ For[an = a[n-1] + 1, True, an++, cnt = 0; Do[If[an == a[i] + a[j], cnt++], {i, 1, n-1}, {j, i+1, n-1}]; If[cnt == 2, Throw[an]]]]; Table[a[n], {n, 1, 56}](* _Jean-François Alcover_, Apr 30 2012 *)
%o (Haskell)
%o a003044 n = a003044_list !! (n-1)
%o a003044_list = 1 : 2 : 3 : 4 : f [4,3..1] where
%o f xs@(x:_) = y : f (y : xs) where
%o y = head [w | w <- [x + 1 ..],
%o length [() | v <- xs, (w - v) `elem` dropWhile (>= v) xs] == 2]
%o -- _Reinhard Zumkeller_, Mar 17 2013
%Y Cf. A060470.
%K nonn,nice
%O 1,2
%A _N. J. A. Sloane_
%E Name edited by _Michel Marcus_, Dec 11 2017