|
|
A003668
|
|
a(n) is smallest number which is uniquely a(j)+a(k), j<k.
(Formerly M1731)
|
|
4
|
|
|
2, 7, 9, 11, 13, 15, 16, 17, 19, 21, 25, 29, 33, 37, 39, 45, 47, 53, 61, 69, 71, 73, 75, 85, 89, 101, 103, 117, 133, 135, 137, 139, 141, 143, 145, 147, 151, 155, 159, 163, 165, 171, 173, 179, 187, 195, 197, 199, 201, 211, 215, 227, 229, 243, 259, 261, 263, 265, 267, 269
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
An Ulam-type sequence - see A002858 for many further references, comments, etc. - T. D. Noe, Jan 21 2008
|
|
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
|
|
|
FORMULA
|
Akeran gives a formula.
For n>7, a(n+26)=a(n)+126. - T. D. Noe, Jan 21 2008
|
|
MATHEMATICA
|
Nest[Append[#, SelectFirst[Union@ Select[Tally@ Map[Total, Select[Permutations[#, {2}], #1 < #2 & @@ # &]], Last@ # == 1 &][[All, 1]], Function[k, FreeQ[#, k]]]] &, {2, 7}, 58] (* Michael De Vlieger, Nov 16 2017 *)
|
|
PROG
|
(Haskell)
a003668 n = a003668_list !! (n-1)
a003668_list = 2 : 7 : ulam 2 7 a003668_list
-- Function ulam as defined in A002858.
(Python)
def aupton(terms):
alst = [2, 7]
for n in range(2, terms):
sums = [alst[j]+alst[k] for j in range(n-1) for k in range(j+1, n)]
alst.append(min([s for s in sums if sums.count(s)==1 and s > alst[-1]]))
return alst
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|