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.

A183170 First of two trees generated by the Beatty sequence of sqrt(2).

Original entry on oeis.org

1, 3, 4, 10, 5, 13, 14, 34, 7, 17, 18, 44, 19, 47, 48, 116, 9, 23, 24, 58, 25, 61, 62, 150, 26, 64, 66, 160, 67, 163, 164, 396, 12, 30, 32, 78, 33, 81, 82, 198, 35, 85, 86, 208, 87, 211, 212, 512, 36, 88, 90, 218, 93, 225, 226, 546, 94, 228
Offset: 1

Views

Author

Clark Kimberling, Dec 28 2010

Keywords

Comments

This tree grows from (L(1),U(1))=(1,3). The other tree, A183171, grows from (L(2),U(2))=(2,6). Here, L is the Beatty sequence A001951 of r=sqrt(2); U is the Beatty sequence A001952 of s=r/(r-1). The two trees are complementary; that is, every positive integer is in exactly one tree. (L and U are complementary, too.) The sequence formed by taking the terms of this tree in increasing order is A183172.

Examples

			First levels of the tree:
.......................1
.......................3
..............4...................10
.........5..........13........14........34
.......7..17......18..44....19..47....48..116
		

Crossrefs

Programs

  • Mathematica
    a = {1, 3}; row = {a[[-1]]}; r = Sqrt[2]; s = r/(r - 1); Do[a = Join[a, row = Flatten[{Floor[#*{r, s}]} & /@ row]], {n, 5}]; a (* Ivan Neretin, May 25 2015 *)

Formula

See the formula at A178528, but use r=sqrt(2) instead of r=sqrt(3).

A026254 a(n) = j if n = [ j*sqrt(3) ], else a(n) = k if n = [ (k/2)*(3 + sqrt(3)) ].

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 3, 5, 4, 6, 5, 7, 8, 6, 9, 7, 10, 8, 11, 12, 9, 13, 10, 14, 15, 11, 16, 12, 17, 13, 18, 19, 14, 20, 15, 21, 16, 22, 23, 17, 24, 18, 25, 19, 26, 27, 20, 28, 21, 29, 30, 22, 31, 23, 32, 24, 33, 34, 25, 35, 26, 36, 27, 37, 38, 28
Offset: 1

Views

Author

Keywords

Comments

Every positive integer occurs exactly twice. a(n) is the parent of n in the tree A178528 generated by the Beatty sequence of sqrt(3).

Crossrefs

Programs

  • Maple
    N:= 100: # to get a(1)..a(N)
    for j from 1 do m:= floor(j*sqrt(3)); if m > N then break fi; A[m]:= j od:
    for k from 1 do m:= floor(k/2*(3+sqrt(3))); if m > N then break fi; A[m]:= k od:
    seq(A[i],i=1..N); # Robert Israel, Jan 08 2018

Extensions

Comment by Clark Kimberling, Dec 24 2010

A183080 Tree generated by the Beatty sequence of 3-sqrt(2).

Original entry on oeis.org

1, 2, 3, 5, 4, 8, 7, 13, 6, 10, 12, 21, 11, 18, 20, 35, 9, 16, 15, 27, 19, 32, 33, 56, 17, 29, 28, 48, 31, 54, 55, 94, 14, 24, 25, 43, 23, 40, 42, 73, 30, 51, 50, 86, 52, 89, 88, 151, 26, 46, 45, 78, 44, 75, 76, 129, 49, 83, 85, 146, 87, 148, 149, 254
Offset: 1

Views

Author

Clark Kimberling, Dec 23 2010

Keywords

Comments

A permutation of the positive integers. See the note at A183079.

Examples

			First five rows:
1
2
3 5
4 8 7 13
6 10 12 21 11 18 20 35
		

Crossrefs

Programs

  • Mathematica
    a = {1, 2}; row = {a[[-1]]}; r = 3 - Sqrt[2]; s = r/(r - 1); Do[a = Join[a, row = Flatten[{Floor[#*{r, s}]} & /@ row]], {n, 5}]; a (* Ivan Neretin, Nov 09 2015 *)

Formula

Let L(n)=floor(n*r), U(n)=floor(n*s), where r=3-sqrt(2) and s=r/(r-1).
The tree-array T(n,k) is then given by rows: T(0,0) = 1; T(1,0) = 2; T(n,2j) = L(T(n-1),j); T(n,2j+1) = U(T(n-1),j); for j=0,1,...,2^(n-1)-1, n>=2.

A183081 Tree generated by the Beatty sequence of 4-sqrt(5).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 8, 11, 10, 13, 12, 16, 15, 20, 14, 18, 19, 25, 17, 23, 22, 30, 21, 27, 28, 36, 26, 34, 35, 46, 24, 32, 31, 41, 33, 43, 44, 57, 29, 39, 40, 53, 38, 50, 52, 69, 37, 48, 47, 62, 49, 64, 63, 83, 45, 60, 59, 78, 61, 80, 81
Offset: 1

Views

Author

Clark Kimberling, Dec 23 2010

Keywords

Comments

A permutation of the positive integers. See the note at A183079.

Examples

			Top 5 rows:
1
2
3 4
5 6 7 9
8 11 10 13 12 16 15 20
		

Crossrefs

Programs

  • Mathematica
    a = {1, 2}; row = {a[[-1]]}; r = 4 - Sqrt[5]; s = r/(r - 1); Do[a = Join[a, row = Flatten[{Floor[#*{r, s}]} & /@ row]], {n, 5}]; a (* Ivan Neretin, Nov 09 2015 *)

Formula

Let L(n)=floor(n*r), U(n)=floor(n*s), where r=4-sqrt(5) and s=r/(r-1).
The tree-array T(n,k) is then given by rows:
T(0,0) = 1; T(1,0) = 2; T(n,2j) = L(T(n-1),j); T(n,2j+1) = U(T(n-1),j);
for j=0,1,...,2^(n-1)-1, n>=2.
Showing 1-4 of 4 results.