A007300 a(1)=2, a(2)=5; for n >= 3, a(n) is smallest number which is uniquely of the form a(j) + a(k) with 1 <= j < k < n.
2, 5, 7, 9, 11, 12, 13, 15, 19, 23, 27, 29, 35, 37, 41, 43, 45, 49, 51, 55, 61, 67, 69, 71, 79, 83, 85, 87, 89, 95, 99, 107, 109, 119, 131, 133, 135, 137, 139, 141, 145, 149, 153, 155, 161, 163, 167, 169, 171, 175, 177, 181, 187, 193, 195, 197, 205, 209, 211, 213, 215
Offset: 1
References
- R. K. Guy, Unsolved Problems in Number Theory, Section C4.
- 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..1000
- J. Cassaigne and S. R. Finch, A class of 1-additive sequences and additive recurrences, Experimental Mathematics, Volume 4 (1995).
- S. R. Finch, Patterns in 1-additive sequences, Experimental Mathematics 1 (1992), 57-63.
- S. R. Finch, On the regularity of certain 1-additive sequences, J. Combin. Theory, A60 (1992), 123-130.
- Steven R. Finch, Are 0-Additive Sequences Always Regular?, Am. Math. Monthly 99 (7) (1992) 671-673.
- S. Finch, Letter to N. J. A. Sloane, Apr. 1994
- R. K. Guy, s-Additive sequences, Preprint, 1994. (Annotated scanned copy)
- Project Euler, Problem 167: Investigating Ulam Sequences.
- R. Queneau, Sur les suites s-additives, J. Combin. Theory, A12 (1972), 31-71.
- Eric Weisstein's World of Mathematics, Ulam Sequence
- Wikipedia, Ulam number
- Index entries for Ulam numbers
- Index entries for linear recurrences with constant coefficients, signature (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1).
Programs
-
Haskell
a007300 n = a007300_list !! (n-1) a007300_list = 2 : 5 : ulam 2 5 a007300_list -- Function ulam as defined in A002858. -- Reinhard Zumkeller, Nov 03 2011
-
Maple
A007300:=n->if n<7 then [2, 5, 7, 9, 11, 12][n] else floor((n-7)/32)*126+[13, 15, 19, 23, 27, 29, 35, 37, 41, 43, 45, 49, 51, 55, 61, 67, 69, 71, 79, 83, 85, 87, 89, 95, 99, 107, 109, 119, 131, 133, 135, 137][modp(n-7,32)+1] fi; # M. F. Hasler, Nov 25 2007
-
Mathematica
theList = {2,5}; Print[2]; Print[5]; For[i=1,i <= 500,i++, count=0; For[j=1,j <= Length[theList]-1,j++, For[k=j+1,k <= Length[theList],k++, If[theList[[j]]+theList[[k]] == i,count++ ]; ]; ]; If[count == 1, Print[i]; theList = Append[theList,i]; ]; ]; (* Sam Handler (sam_5_5_5_0(AT)yahoo.com), Aug 08 2006 *) Nest[Append[#, SelectFirst[Union@ Select[Tally@ Map[Total, Select[Permutations[#, {2}], #1 < #2 & @@ # &]], Last@ # == 1 &][[All, 1]], Function[k, FreeQ[#, k]]]] &, {2, 5}, 59] (* Michael De Vlieger, Nov 16 2017 *)
Formula
For n > 6, a(n+32) = a(n) + 126. - T. D. Noe, Jan 21 2008
Extensions
More terms from Joshua Zucker, May 24 2006
More terms from Sam Handler (sam_5_5_5_0(AT)yahoo.com), Aug 08 2006
Comments