login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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.
(Formerly M1328)
18

%I M1328 #45 Feb 21 2020 20:44:55

%S 2,5,7,9,11,12,13,15,19,23,27,29,35,37,41,43,45,49,51,55,61,67,69,71,

%T 79,83,85,87,89,95,99,107,109,119,131,133,135,137,139,141,145,149,153,

%U 155,161,163,167,169,171,175,177,181,187,193,195,197,205,209,211,213,215

%N 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.

%C An Ulam-type sequence - see A002858 for many further references, comments, etc.

%C I have a note saying that this is periodic mod 126. Is that correct? - _N. J. A. Sloane_, Apr 29 2006

%C Comments from _Joshua Zucker_, May 24 2006: "Concerning the conjecture about periodicity mod 126. Out of the first 300 terms, only the 2 and 12 are even. But if you neglect those first 6 terms, mod 2 they're all odd, mod 9 it goes: 0 4 6 1 7 4 6 8 7 2 4 6 8 5 0 8 1 2 5 7 0 2 4 6 1 5 0 2 8 1 5 7 which appears to repeat indefinitely and mod 7 it goes: 0 2 6 1 3 0 2 6 5 4 6 1 2 6 1 3 5 4 1 2 4 0 5 0 2 4 6 1 5 2 6 1 which also appears to repeat indefinitely.

%C "So it seems as though neglecting the first few terms, it is indeed periodic mod 126 with period 32. In fact it appears that after the first few terms, a(n+32) = a(n) + 126. But this is only based on the first few hundred terms and is not proved!

%C "The Mathworld link cites a proof that sequences of this type (2,n) have only two even terms and another proof that sequences with only finitely many even terms must eventually have periodic first differences. So I think the period 32 difference of 126 conjecture may be proved in those references."

%C Given that the sequence of first differences is periodic with period 32 after the first 6 terms (3,2,2,2,1,1), the repeating digits being p=(2,4,4,4,2,6,2,4,2,2,4,2,4,6,6,2,2,8,4,2,2,2,6,4,8,2,10,12,2,2,2,2), one can calculate the n-th term (n>6) as a(n)=13+floor((n-7)/32)*S(32)+S(n-7 mod 32) where S(k)=sum(p(i),i=1..k): (S(k);k=0..32)=(0, 2, 6, 10, 14, 16, 22, 24, 28, 30, 32, 36, 38, 42, 48, 54, 56, 58, 66, 70, 72, 74, 76, 82, 86, 94, 96, 106, 118, 120, 122, 124, 126). - _M. F. Hasler_, Nov 25 2007

%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="/A007300/b007300.txt">Table of n, a(n) for n = 1..1000</a>

%H J. Cassaigne and S. R. Finch, <a href="http://www.emis.de/journals/EM/expmath/volumes/4/4.html">A class of 1-additive sequences and additive recurrences</a>, Experimental Mathematics, Volume 4 (1995).

%H S. R. Finch, <a href="https://www.emis.de/journals/EM/expmath/volumes/1/1.html">Patterns in 1-additive sequences</a>, Experimental Mathematics 1 (1992), 57-63.

%H S. R. Finch, <a href="https://doi.org/10.1016/0097-3165(92)90042-S">On the regularity of certain 1-additive sequences</a>, J. Combin. Theory, A60 (1992), 123-130.

%H Steven R. Finch, <a href="http://dx.doi.org/10.2307/2325001">Are 0-Additive Sequences Always Regular?</a>, Am. Math. Monthly 99 (7) (1992) 671-673.

%H S. Finch, <a href="/A007300/a007300_1.pdf">Letter to N. J. A. Sloane, Apr. 1994</a>

%H R. K. Guy, <a href="/A007300/a007300.pdf">s-Additive sequences</a>, Preprint, 1994. (Annotated scanned copy)

%H Project Euler, <a href="https://projecteuler.net/problem=167">Problem 167: Investigating Ulam Sequences</a>.

%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.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/UlamSequence.html">Ulam Sequence</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Ulam_number">Ulam number</a>

%H <a href="/index/U#Ulam_num">Index entries for Ulam numbers</a>

%H <a href="/index/Rec#order_33">Index entries for linear recurrences with constant coefficients</a>, 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).

%F For n > 6, a(n+32) = a(n) + 126. - _T. D. Noe_, Jan 21 2008

%p 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

%t 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 *)

%t 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 *)

%o (Haskell)

%o a007300 n = a007300_list !! (n-1)

%o a007300_list = 2 : 5 : ulam 2 5 a007300_list

%o -- Function ulam as defined in A002858.

%o -- _Reinhard Zumkeller_, Nov 03 2011

%Y Cf. A100729, A003666, A003667, A006844.

%Y Cf. A003664.

%K nonn,easy

%O 1,1

%A _N. J. A. Sloane_, _Mira Bernstein_

%E More terms from _Joshua Zucker_, May 24 2006

%E More terms from Sam Handler (sam_5_5_5_0(AT)yahoo.com), Aug 08 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 08:20 EDT 2024. Contains 371782 sequences. (Running on oeis4.)