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-4 of 4 results.

A184117 Lower s-Wythoff sequence, where s(n) = 2n + 1.

Original entry on oeis.org

1, 2, 3, 5, 6, 8, 9, 11, 12, 13, 15, 16, 18, 19, 20, 22, 23, 25, 26, 27, 29, 30, 32, 33, 35, 36, 37, 39, 40, 42, 43, 44, 46, 47, 49, 50, 52, 53, 54, 56, 57, 59, 60, 61, 63, 64, 66, 67, 69, 70, 71, 73, 74, 76, 77, 78, 80, 81, 83, 84, 85, 87, 88, 90, 91, 93, 94, 95, 97, 98, 100, 101, 102, 104, 105, 107, 108, 110, 111, 112, 114, 115, 117, 118, 119, 121, 122, 124, 125, 126, 128, 129, 131, 132, 134, 135, 136, 138, 139, 141
Offset: 1

Views

Author

Clark Kimberling, Jan 09 2011

Keywords

Comments

Suppose that s(n) is a nondecreasing sequence of positive integers. The lower and upper s(n)-Wythoff sequences, a and b, are introduced here. Define
a(1) = 1; b(1) = s(1) + a(1); and for n>=2,
a(n) = least positive integer not in {a(1),...,a(n-1),b(1),...,b(n-1)},
b(n) = s(n) + a(n).
Clearly, a and b are complementary. If s(n)=n, then
a=A000201, the lower Wythoff sequence, and
b=A001950, the upper Wythoff sequence.
A184117 is chosen to represent the class of s-Wythoff sequences for which s is an arithmetic sequence given by s(n) = kn - r. Such sequences (lower and upper) are indexed in the OEIS as shown here:
n+1....A026273...A026274
n......A000201...A001950 (the classical Wythoff sequences)
2n+1...A184117...A184118
2n.....A001951...A001952
2n-1...A136119...A184119
3n+1...A184478...A184479
3n.....A184480...A001956
3n-1...A184482...A184483
3n-2...A184484...A184485
4n+1...A184486...A184487
4n.....A001961...A001962
4n-1...A184514...A184515
The pattern continues for A184516 to A184531.
s-Wythoff sequences for choices of s other than arithmetic sequences include these:
A184419 and A184420 (s = lower Wythoff sequence)
A184421 and A184422 (s = upper Wythoff sequence)
A184425 and A184426 (s = triangular numbers)
A184427 and A184428 (s = squares)
A036554 and A003159 (invariant and limiting sequences).

Examples

			s=(3,5,7,9,11,13,...);
a=(1,2,3,5,6,8,...);
b=(4,7,10,14,17,21,...).
		

Crossrefs

Programs

  • Mathematica
    k=2; r=-1;
    mex:=First[Complement[Range[1,Max[#1]+1],#1]]&;
    s[n_]:=k*n-r; a[1]=1; b[n_]:=b[n]=s[n]+a[n];
    a[n_]:=a[n]=mex[Flatten[Table[{a[i],b[i]},{i,1,n-1}]]];
    Table[s[n],{n,30}]  (* s = A005408 except for initial 1 *)
    Table[a[n],{n,100}] (* a = A184117 *)
    Table[b[n],{n,100}] (* b = A184118 *)
  • PARI
    A184117_upto(N,s(n)=2*n+1,a=[1],U=a)={while(a[#a]1&&U[2]==U[1]+1,U=U[^1]);a=concat(a,U[1]+1));a} \\ M. F. Hasler, Jan 07 2019

Formula

a(n) = A184118(n) - s(n). - M. F. Hasler, Jan 07 2019

Extensions

Removed an incorrect g.f., Alois P. Heinz, Dec 14 2012

A001956 Beatty sequence of (5+sqrt(13))/2.

Original entry on oeis.org

4, 8, 12, 17, 21, 25, 30, 34, 38, 43, 47, 51, 55, 60, 64, 68, 73, 77, 81, 86, 90, 94, 98, 103, 107, 111, 116, 120, 124, 129, 133, 137, 141, 146, 150, 154, 159, 163, 167, 172, 176, 180, 185, 189, 193, 197, 202, 206, 210, 215, 219, 223, 228, 232, 236, 240, 245, 249
Offset: 1

Views

Author

Keywords

Comments

Inserting a=3 into the Fraenkel formula, a scale factor alpha = (2-a+sqrt(a^2+4))/2 = (sqrt(13)-1)/2 is obtained, which defines the Beatty sequence A184480. The complementary beta parameter, 1/beta+1/alpha=1, is beta = (5+sqrt(13))/2 = 3+alpha, and defines this sequence here, which is the complement in the positive integers. - R. J. Mathar, Feb 12 2011
Upper s-Wythoff sequence, where s(n)=3n. See A184117 for the definition of lower and upper s-Wythoff sequences. - Clark Kimberling, Jan 15 2011

References

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

Crossrefs

Complement of A184480.

Programs

  • Maple
    A001956 := proc(n) local x ; x := (5+sqrt(13))/2 ; floor(n*x) ; end proc:
    A184480 := proc(n) local x ; x := (sqrt(13)-1)/2 ; floor(n*x) ; end proc:
    seq(A001956(n),n=1..100) ; # R. J. Mathar, Feb 12 2011
  • Mathematica
    Table[Floor[n*(5 + Sqrt[13])/2], {n, 100}] (* T. D. Noe, Aug 17 2012 *)

Formula

a(n) = floor(n*beta) with beta = (5+sqrt(13))/2 = 3+(sqrt(13)-1)/2 = 4.30277563773199...

A001955 Beatty sequence of 1 + 1/sqrt(11).

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 15, 16, 18, 19, 20, 22, 23, 24, 26, 27, 28, 29, 31, 32, 33, 35, 36, 37, 39, 40, 41, 42, 44, 45, 46, 48, 49, 50, 52, 53, 54, 55, 57, 58, 59, 61, 62, 63, 65, 66, 67, 68, 70, 71, 72, 74, 75, 76, 78, 79, 80, 81, 83, 84, 85, 87, 88
Offset: 1

Views

Author

Keywords

Comments

From R. J. Mathar, Feb 12 2011: (Start)
The value of 1+1/sqrt(11) = 1.30151134457.. is close to (sqrt(13)-1)/2 = 1.3027756377..., so the early terms of the sequence are similar to A184480.
According to the Fraenkel article, the complementary sequence is defined by floor(n*(1+sqrt(11))). (End)

References

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

Programs

  • Maple
    A001955 := proc(n) local x ; x := 1+1/sqrt(11) ; floor(n*x) ; end proc:
    # for the complementary sequence
    A001955compl := proc(n) local x ; x := 1+sqrt(11) ; floor(n*x) ; end proc:
    seq(A001955(n),n=1..100) ; # R. J. Mathar, Feb 12 2011
  • Mathematica
    Table[Floor[n*(1 + 1/Sqrt[11])], {n, 1, 65}]

Extensions

More terms from Robert G. Wilson v, Nov 02 2000

A184478 Lower s-Wythoff sequence, where s(n) = 3n + 1. Complement of A184479.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 10, 11, 12, 14, 15, 16, 18, 19, 20, 21, 23, 24, 25, 27, 28, 29, 31, 32, 33, 34, 36, 37, 38, 40, 41, 42, 44, 45, 46, 47, 49, 50, 51, 53, 54, 55, 57, 58, 59, 60, 62, 63, 64, 66, 67, 68, 70, 71, 72, 74, 75, 76, 77, 79, 80, 81, 83, 84, 85, 87, 88, 89, 90, 92, 93, 94, 96, 97, 98, 100, 101, 102, 103, 105, 106, 107, 109, 110, 111, 113, 114, 115, 117, 118, 119, 120, 122, 123, 124, 126, 127, 128, 130, 131, 132, 133, 135, 136, 137, 139, 140, 141, 143, 144, 145, 146, 148, 149, 150, 152, 153, 154, 156
Offset: 1

Views

Author

Clark Kimberling, Jan 15 2011

Keywords

Comments

See A184117 for the definition of lower and upper s-Wythoff sequences.
The sequence is defined by a(1) = 1 and for n > 1, a(n) is the smallest positive integer not in {a(k), a(k) + s(k); k < n}. - M. F. Hasler, Jan 07 2019

Crossrefs

Programs

  • Magma
    [(Floor(n*(-1+Sqrt(13))/2))+1: n in [0..120]]; // Vincenzo Librandi, Jan 08 2019
  • Maple
    a:=n->floor(n*(-1+sqrt(13))/2+1): seq(a(n),n=0..120); # Muniru A Asiru, Jan 08 2019
  • Mathematica
    k=3; r=-1; d=Sqrt[4+k^2];
    a[n_]:=Floor[(1/2)(d+2-k)(n+r/(d+2))];
    b[n_]:=Floor[(1/2)(d+2+k)(n-r/(d+2))];
    Table[a[n],{n,120}]
    Table[b[n],{n,120}]
    Table[(Floor[n (-1 + Sqrt[13]) / 2]) + 1, {n, 0, 120}] (* Vincenzo Librandi, Jan 08 2019 *)
  • PARI
    A184478_upto(N, s(n)=3*n+1, a=[1], U=a)={while(a[#a]1&&U[2]==U[1]+1, U=U[^1]); a=concat(a, U[1]+1)); a} \\ M. F. Hasler, Jan 07 2019
    

Formula

a(n) = A184479(n) - s(n). - M. F. Hasler, Jan 07 2019
Showing 1-4 of 4 results.