OFFSET
1,2
COMMENTS
REFERENCES
R. K. Guy, "s-Additive sequences", preprint, 1994.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
S. R. Finch, Patterns in 1-additive sequences, Experimental Mathematics 1 (1992), 57-63.
R. K. Guy, s-Additive sequences, Preprint, 1994. (Annotated scanned copy)
Eric Weisstein's World of Mathematics, Ulam Sequence
Wikipedia, Ulam number
MATHEMATICA
Nest[Append[#, SelectFirst[Union@ Select[Tally@ Map[Total, Select[Permutations[#, {2}], #1 < #2 & @@ # &]], Last@ # == 1 &][[All, 1]], Function[k, FreeQ[#, k]]]] &, {1, 4}, 58] (* Michael De Vlieger, Nov 16 2017 *)
PROG
(Haskell)
a003666 n = a003666_list !! (n-1)
a003666_list = 1 : 4 : ulam 2 4 a003666_list
-- Function ulam as defined in A002858.
-- Reinhard Zumkeller, Nov 03 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved