cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-5 of 5 results.

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.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

An Ulam-type sequence - see A002858 for many further references, comments, etc.
I have a note saying that this is periodic mod 126. Is that correct? - N. J. A. Sloane, Apr 29 2006
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.
"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!
"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."
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

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

Crossrefs

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

A135737 Ulam type (1-additive) sequences u[1]=2, u[2]=2n+1, u[k+1] is least unique sum u[i]+u[j]>u[k], 1<=i

Original entry on oeis.org

2, 3, 2, 5, 5, 2, 7, 7, 7, 2, 8, 9, 9, 9, 2, 9, 11, 11, 11, 11, 2, 13, 12, 13, 13, 13, 13, 2, 14, 13, 15, 15, 15, 15, 15, 2, 18, 15, 16, 17, 17, 17, 17, 17, 2, 19, 19, 17, 19, 19, 19, 19, 19, 19, 2, 24, 23, 19, 20, 21, 21, 21, 21, 21, 21, 2, 25, 27, 21, 21, 23, 23, 23, 23, 23, 23, 23
Offset: 1

Views

Author

M. F. Hasler, Nov 26 2007

Keywords

Comments

Any of the sequences u=U(2,2n+1) has u[1]=2 and u[n+4]=4n+4; in between these there are the odd numbers 2n+1,...,4n-3. For n>1 there are no other even terms and the sequence of first differences becomes periodic for k>=t (transient phase), such that u[k] = u[k-floor((k-t)/p)*p] + floor((k-t)/p)*d, where p is the period (cf. A100729) and d the fundamental difference (cf. A100730). See the cross-references, especially A002858, for more information.

Examples

			The sequence contains the terms of the table T[n,k] = U(2,2n+1)[k], read by antidiagonals: a[1]=T[1,1]=2, a[2]=T[1,2]=3, a[3]=T[2,1]=2, a[4]=T[1,3]=5,...
n=1: U(2,3)= 2, 3, 5, 7, 8, 9,13,14...
n=2: U(2,5)= 2, 5, 7, 9,11,12,...
n=3: U(2,7)= 2, 7, 9,11,13,...
n=4: U(2,9)= 2, 9,11,...
		

Crossrefs

Cf. A001857 = U(2, 3) = row 1, A007300 = U(2, 5) = row 2, A003668 = U(2, 7) = row 3; A100729-A100730 (period).
Cf. A002858 = U(1, 2): this would be row 0, with u[1], u[2] exchanged.
See also: A002859 = U(1, 3), A003666 = U(1, 4), A003667 = U(1, 5).

Programs

  • PARI
    ulam(a,b,Nmax=30,i)=a=[a,b]; b=[a[1]+b]; for( k=3,Nmax, i=1; while(( i<#b && b[i]==b[i+1] && i+=2 ) || ( i>1 && b[i]==b[i-1] && i++),); a=concat(a,b[i]); b=vecsort(concat(vecextract(b,Str("^..",i)),vector(k-1,j,a[k]+a[j]))); i=0; for(j=1,#b-2, if( b[j]==b[j+2], i+=1<A135737(Nmax=100)=local(T=vector(sqrtint(Nmax*2)+1,n, ulam(2,2*n+1, sqrtint(Nmax*2)+2-n)),i,j); vector(Nmax,k,if(j>1,T[i++ ][j-- ],j=i+1;T[i=1][j]))

A001857 a(1)=2, a(2)=3; for n >= 3, a(n) is smallest number that is uniquely of the form a(j) + a(k) with 1 <= j < k < n.

Original entry on oeis.org

2, 3, 5, 7, 8, 9, 13, 14, 18, 19, 24, 25, 29, 30, 35, 36, 40, 41, 46, 51, 56, 63, 68, 72, 73, 78, 79, 83, 84, 89, 94, 115, 117, 126, 153, 160, 165, 169, 170, 175, 176, 181, 186, 191, 212, 214, 230, 235, 240, 245, 266, 273, 278, 283, 288, 325, 331, 332, 337, 342
Offset: 1

Views

Author

Keywords

Comments

An Ulam-type sequence - see A002858 for many further references, comments, etc.
A plot of the first 10^6 terms shows a nearly straight line having a slope of about 11.1. In contrast to A002858, this sequence has many consecutive numbers; of the first 10^6 terms, consecutive numbers appear 141674 times! - T. D. Noe, Jan 21 2008

References

  • S. R. Finch, Patterns in 1-additive sequences, Experimental Mathematics 1 (1992), 57-63.
  • S. R. Finch, Mathematical Constants, Cambridge, 2003, pp. 145-151.
  • R. K. Guy, Unsolved Problems in Number Theory, Section C4.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • S. M. Ulam, Problems in Modern Mathematics, Wiley, NY, 1960, p. ix.

Crossrefs

Programs

  • Haskell
    a001857 n = a001857_list !! (n-1)
    a001857_list = 2 : 3 : ulam 2 3 a001857_list
    -- Function ulam as defined in A002858.
    -- Reinhard Zumkeller, Nov 03 2011
  • Mathematica
    s = {2, 3}; Do[ AppendTo[s, n = Last[s]; While[n++; Length[ DeleteCases[ Intersection[s, n-s], n/2, 1, 1]] != 2]; n], {100}]; s (* Jean-François Alcover, Sep 08 2011 *)

Extensions

More terms from Jud McCranie

A100730 Fundamental difference of Ulam 1-additive sequence starting U(2,2n+1).

Original entry on oeis.org

126, 126, 1778, 6510, 23622, 510, 507842, 1523526, 8388606, 4194302, 597870, 35791394, 21691754, 2046, 511305630, 45678505642, 51539607546, 640638112422, 2748779069430, 25563645345606, 46912496118442, 80418967640942
Offset: 2

Views

Author

Ralf Stephan, Dec 03 2004

Keywords

Crossrefs

Cf. A100729 for the period, A001857 for U(2, 3), A007300 for U(2, 5), A003668 for U(2, 7).

Formula

a(n) = 2 * A046932(2*n+2)

Extensions

2 more terms from Balakrishnan V (balaji.iitm1(AT)gmail.com), Nov 15 2007
Further new terms and b-file from Max Alekseyev, Dec 01 2007
b-file extended by Max Alekseyev, Aug 17 2015

A003668 a(n) is smallest number which is uniquely a(j)+a(k), j

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

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

Crossrefs

Cf. A100729.

Programs

  • Haskell
    a003668 n = a003668_list !! (n-1)
    a003668_list = 2 : 7 : ulam 2 7 a003668_list
    -- Function ulam as defined in A002858.
    -- Reinhard Zumkeller, Nov 03 2011
    
  • 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 *)
  • 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
    print(aupton(60)) # Michael S. Branicky, Feb 07 2021

Formula

Akeran gives a formula.
For n>7, a(n+26)=a(n)+126. - T. D. Noe, Jan 21 2008
Showing 1-5 of 5 results.