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

A143484 "Fourth down, Extream [sic] between the two farthest Bells from it" in bell-ringing is a sequence of permutations p_1=(1,2,3,4), p_2=(1,2,4,3), .. which runs through all permutations of {1,2,3,4} with period 24; sequence gives number in position 1 of n-th permutation.

Original entry on oeis.org

1, 1, 1, 4, 4, 1, 1, 1, 3, 3, 3, 4, 4, 3, 3, 3, 2, 2, 2, 4, 4, 2, 2, 2, 1, 1, 1, 4, 4, 1, 1, 1, 3, 3, 3, 4, 4, 3, 3, 3, 2, 2, 2, 4, 4, 2, 2, 2, 1, 1, 1, 4, 4, 1, 1, 1, 3, 3, 3, 4, 4, 3, 3, 3, 2, 2, 2, 4, 4, 2, 2, 2, 1, 1, 1, 4, 4, 1, 1, 1, 3, 3, 3, 4, 4, 3, 3, 3, 2, 2, 2, 4, 4, 2, 2, 2, 1, 1, 1, 4, 4, 1, 1, 1, 3
Offset: 1

Views

Author

Alois P. Heinz, Aug 19 2008

Keywords

Comments

Start with (1,2,3,4), i.e. the first permutation of {1,2,3} followed by 4; then for each next permutation, transpose 4 one to the left; if at position 1, replace {1,2,3} recursively by the next permutation of these numbers. Thereafter, for each next permutation, transpose 4 to the right. And so on.

Examples

			The full list of the 24 permutations is as follows (the present sequence gives the first column):
1 2 3 4
1 2 4 3
1 4 2 3
4 1 2 3
4 1 3 2
1 4 3 2
1 3 4 2
1 3 2 4
3 1 2 4
3 1 4 2
3 4 1 2
4 3 1 2
4 3 2 1
3 4 2 1
3 2 4 1
3 2 1 4
2 3 1 4
2 3 4 1
2 4 3 1
4 2 3 1
4 2 1 3
2 4 1 3
2 1 4 3
2 1 3 4
		

Crossrefs

Programs

  • Maple
    ring:= proc(k::nonnegint) local p,i,left,l,nf,ini; if k<=1 then proc() [1$k] end else ini := proc() p:= ring(k-1); i:= k; left:= true; l:= p(); nf:= k! end; ini(); proc() local ll; ll:= [seq(l[t], t=1..(i-1)), k, seq(l[t], t=i..(k-1))]; if left then if i>1 then i:= i-1 else left:= false; l:=p() fi else if i bell(4)[modp(n-1,24)+1][1]: seq(a(n), n=1..121);
  • Mathematica
    LinearRecurrence[{2, -2, 1, 0, 0, -1, 2, -2, 1, 0, 0, -1, 2, -2, 1, 0, 0, -1, 2, -2, 1}  {1, 1, 1, 4, 4, 1, 1, 1, 3, 3, 3, 4, 4, 3, 3, 3, 2, 2, 2, 4, 4}, 105] (* Jean-François Alcover, Mar 14 2021 *)

Formula

Period 24.

A143486 "Fourth down, Extream [sic] between the two farthest Bells from it" in bell-ringing is a sequence of permutations p_1=(1,2,3,4), p_2=(1,2,4,3), .. which runs through all permutations of {1,2,3,4} with period 24; sequence gives number in position 3 of n-th permutation.

Original entry on oeis.org

3, 4, 2, 2, 3, 3, 4, 2, 2, 4, 1, 1, 2, 2, 4, 1, 1, 4, 3, 3, 1, 1, 4, 3, 3, 4, 2, 2, 3, 3, 4, 2, 2, 4, 1, 1, 2, 2, 4, 1, 1, 4, 3, 3, 1, 1, 4, 3, 3, 4, 2, 2, 3, 3, 4, 2, 2, 4, 1, 1, 2, 2, 4, 1, 1, 4, 3, 3, 1, 1, 4, 3, 3, 4, 2, 2, 3, 3, 4, 2, 2, 4, 1, 1, 2, 2, 4, 1, 1, 4, 3, 3, 1, 1, 4, 3, 3, 4, 2, 2, 3, 3, 4, 2, 2
Offset: 1

Views

Author

Alois P. Heinz, Aug 19 2008

Keywords

Comments

Start with (1,2,3,4), i.e. the first permutation of {1,2,3} followed by 4; then for each next permutation, transpose 4 one to the left; if at position 1, replace {1,2,3} recursively by the next permutation of these numbers. Thereafter, for each next permutation, transpose 4 to the right. And so on.

Crossrefs

Programs

  • Maple
    ring:= proc(k::nonnegint) local p,i,left,l,nf,ini; if k<=1 then proc() [1$k] end else ini := proc() p:= ring(k-1); i:= k; left:= true; l:= p(); nf:= k! end; ini(); proc() local ll; ll:= [seq(l[t], t=1..(i-1)), k, seq(l[t], t=i..(k-1))]; if left then if i>1 then i:= i-1 else left:= false; l:=p() fi else if i bell(4)[modp(n-1,24)+1][3]: seq (a(n), n=1..121);
  • Mathematica
    LinearRecurrence[{2, -2, 1, 0, 0, -1, 2, -2, 1, 0, 0, -1, 2, -2, 1, 0, 0, -1, 2, -2, 1}, {3, 4, 2, 2, 3, 3, 4, 2, 2, 4, 1, 1, 2, 2, 4, 1, 1, 4, 3, 3, 1}, 105] (* Jean-François Alcover, Mar 14 2021 *)

Formula

Period 24.
From Chai Wah Wu, Jan 07 2020: (Start)
a(n) = 2*a(n-1) - 2*a(n-2) + a(n-3) - a(n-6) + 2*a(n-7) - 2*a(n-8) + a(n-9) - a(n-12) + 2*a(n-13) - 2*a(n-14) + a(n-15) - a(n-18) + 2*a(n-19) - 2*a(n-20) + a(n-21) for n > 21.
G.f.: x*(-3*x^20 + 2*x^19 + x^18 - 4*x^17 + x^16 + 2*x^15 - 6*x^14 + 6*x^13 - 3*x^12 - 4*x^11 + 6*x^10 - 3*x^9 - 3*x^8 + 5*x^7 - 5*x^6 + x^5 + x^4 - 3*x^3 + 2*x - 3)/((x - 1)*(x^2 + 1)*(x^4 + 1)*(x^2 - x + 1)*(x^4 - x^2 + 1)*(x^8 - x^4 + 1)). (End)

A143485 "Fourth down, Extream [sic] between the two farthest Bells from it" in bell-ringing is a sequence of permutations p_1=(1,2,3,4), p_2=(1,2,4,3), .. which runs through all permutations of {1,2,3,4} with period 24; sequence gives number in position 2 of n-th permutation.

Original entry on oeis.org

2, 2, 4, 1, 1, 4, 3, 3, 1, 1, 4, 3, 3, 4, 2, 2, 3, 3, 4, 2, 2, 4, 1, 1, 2, 2, 4, 1, 1, 4, 3, 3, 1, 1, 4, 3, 3, 4, 2, 2, 3, 3, 4, 2, 2, 4, 1, 1, 2, 2, 4, 1, 1, 4, 3, 3, 1, 1, 4, 3, 3, 4, 2, 2, 3, 3, 4, 2, 2, 4, 1, 1, 2, 2, 4, 1, 1, 4, 3, 3, 1, 1, 4, 3, 3, 4, 2, 2, 3, 3, 4, 2, 2, 4, 1, 1, 2, 2, 4, 1, 1, 4, 3, 3, 1
Offset: 1

Views

Author

Alois P. Heinz, Aug 19 2008

Keywords

Comments

Start with (1,2,3,4), i.e. the first permutation of {1,2,3} followed by 4; then for each next permutation, transpose 4 one to the left; if at position 1, replace {1,2,3} recursively by the next permutation of these numbers. Thereafter, for each next permutation, transpose 4 to the right. And so on.

Crossrefs

Programs

  • Maple
    ring:= proc(k::nonnegint) local p,i,left,l,nf, ini; if k<=1 then proc() [1$k] end else ini := proc() p:= ring(k-1); i:= k; left:= true; l:= p(); nf:= k! end; ini(); proc() local ll; ll:= [seq(l[t], t=1..(i-1)), k, seq(l[t], t=i..(k-1))]; if left then if i>1 then i:= i-1 else left:= false; l:=p() fi else if i bell(4)[modp(n-1,24)+1][2]: seq (a(n), n=1..121);
  • Mathematica
    LinearRecurrence[{2, -2, 1, 0, 0, -1, 2, -2, 1, 0, 0, -1, 2, -2, 1, 0, 0, -1, 2, -2, 1}, {2, 2, 4, 1, 1, 4, 3, 3, 1, 1, 4, 3, 3, 4, 2, 2, 3, 3, 4, 2, 2}, 105] (* Jean-François Alcover, Mar 14 2021 *)

Formula

Period 24.
From Chai Wah Wu, Jan 15 2020: (Start)
a(n) = 2*a(n-1) - 2*a(n-2) + a(n-3) - a(n-6) + 2*a(n-7) - 2*a(n-8) + a(n-9) - a(n-12) + 2*a(n-13) - 2*a(n-14) + a(n-15) - a(n-18) + 2*a(n-19) - 2*a(n-20) + a(n-21) for n > 21.
G.f.: x*(-x^20 + x^19 - 4*x^18 + 5*x^17 - 5*x^16 + 2*x^14 - 2*x^13 - 2*x^12 + 4*x^11 - 6*x^10 + 3*x^9 - x^8 - 2*x^7 + 2*x^6 - 5*x^4 + 5*x^3 - 4*x^2 + 2*x - 2)/((x - 1)*(x^2 + 1)*(x^4 + 1)*(x^2 - x + 1)*(x^4 - x^2 + 1)*(x^8 - x^4 + 1)). (End)

A143487 "Fourth down, Extream [sic] between the two farthest Bells from it" in bell-ringing is a sequence of permutations p_1=(1,2,3,4), p_2=(1,2,4,3), .. which runs through all permutations of {1,2,3,4} with period 24; sequence gives number in position 4 of n-th permutation.

Original entry on oeis.org

4, 3, 3, 3, 2, 2, 2, 4, 4, 2, 2, 2, 1, 1, 1, 4, 4, 1, 1, 1, 3, 3, 3, 4, 4, 3, 3, 3, 2, 2, 2, 4, 4, 2, 2, 2, 1, 1, 1, 4, 4, 1, 1, 1, 3, 3, 3, 4, 4, 3, 3, 3, 2, 2, 2, 4, 4, 2, 2, 2, 1, 1, 1, 4, 4, 1, 1, 1, 3, 3, 3, 4, 4, 3, 3, 3, 2, 2, 2, 4, 4, 2, 2, 2, 1, 1, 1, 4, 4, 1, 1, 1, 3, 3, 3, 4, 4, 3, 3, 3, 2, 2, 2, 4, 4
Offset: 1

Views

Author

Alois P. Heinz, Aug 19 2008

Keywords

Comments

Start with (1,2,3,4), i.e. the first permutation of {1,2,3} followed by 4; then for each next permutation, transpose 4 one to the left; if at position 1, replace {1,2,3} recursively by the next permutation of these numbers. Thereafter, for each next permutation, transpose 4 to the right. And so on.

Crossrefs

Programs

  • Maple
    ring:= proc(k::nonnegint) local p,i,left,l,nf,ini; if k<=1 then proc() [1$k] end else ini := proc() p:= ring(k-1); i:= k; left:= true; l:= p(); nf:= k! end; ini(); proc() local ll; ll:= [seq(l[t], t=1..(i-1)), k, seq(l[t], t=i..(k-1))]; if left then if i>1 then i:= i-1 else left:= false; l:=p() fi else if i bell(4)[modp(n-1,24)+1][4]: seq (a(n), n=1..121);
  • Mathematica
    LinearRecurrence[{2, -2, 1, 0, 0, -1, 2, -2, 1, 0, 0, -1, 2, -2, 1, 0, 0, -1, 2, -2, 1}, {4, 3, 3, 3, 2, 2, 2, 4, 4, 2, 2, 2, 1, 1, 1, 4, 4, 1, 1, 1, 3}, 105] (* Jean-François Alcover, Mar 15 2021 *)

Formula

Period 24.
From Chai Wah Wu, Jan 15 2020: (Start)
a(n) = 2*a(n-1) - 2*a(n-2) + a(n-3) - a(n-6) + 2*a(n-7) - 2*a(n-8) + a(n-9) - a(n-12) + 2*a(n-13) - 2*a(n-14) + a(n-15) - a(n-18) + 2*a(n-19) - 2*a(n-20) + a(n-21) for n > 21.
G.f.: x*(-4*x^20 + 5*x^19 - 5*x^18 + x^17 + 2*x^16 - 2*x^15 - 2*x^14 + 2*x^13 - 2*x^12 + x^11 - x^10 + x^9 - 3*x^8 + 3*x^7 - 3*x^6 - x^5 + x^4 + x^3 - 5*x^2 + 5*x - 4)/((x - 1)*(x^2 + 1)*(x^4 + 1)*(x^2 - x + 1)*(x^4 - x^2 + 1)*(x^8 - x^4 + 1)). (End)

A143489 "Fourth down, Extream [sic] between the two farthest Bells from it" in bell-ringing is a sequence of permutations p_1=(1,2,3,4), p_2=(1,2,4,3), .. which runs through all permutations of {1,2,3,4} with period 24; sequence gives position of bell 2 in n-th permutation.

Original entry on oeis.org

2, 2, 3, 3, 4, 4, 4, 3, 3, 4, 4, 4, 3, 3, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 3, 3, 4, 4, 4, 3, 3, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 3, 3, 4, 4, 4, 3, 3, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 3, 3, 4, 4, 4, 3, 3, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 3, 3
Offset: 1

Views

Author

Alois P. Heinz, Aug 19 2008

Keywords

Comments

Start with (1,2,3,4), i.e. the first permutation of {1,2,3} followed by 4; then for each next permutation, transpose 4 one to the left; if at position 1, replace {1,2,3} recursively by the next permutation of these numbers. Thereafter, for each next permutation, transpose 4 to the right. And so on.

Crossrefs

Programs

  • Maple
    ring:= proc(k::nonnegint) local p,i,left,l,nf, ini; if k<=1 then proc() [1$k] end else ini := proc() p:= ring(k-1); i:= k; left:= true; l:= p(); nf:= k! end; ini(); proc() local ll; ll:= [seq(l[t], t=1..(i-1)), k, seq(l[t], t=i..(k-1))]; if left then if i>1 then i:= i-1 else left:= false; l:=p() fi else if i indx (bell(4)[modp(n-1,24)+1], 2): seq (a(n), n=1..121);
  • Mathematica
    LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1}, {2, 2, 3, 3, 4, 4, 4, 3, 3, 4, 4, 4, 3, 3, 2, 2, 1, 1, 1, 2, 2}, 105] (* Jean-François Alcover, Mar 15 2021 *)

Formula

Period 24.
From Chai Wah Wu, Jan 15 2020: (Start)
a(n) = a(n-1) - a(n-12) + a(n-13) for n > 13.
G.f.: x*(-x^12 - x^9 + x^7 - x^4 - x^2 - 2)/(x^13 - x^12 + x - 1). (End)

A143488 "Fourth down, Extream [sic] between the two farthest Bells from it" in bell-ringing is a sequence of permutations p_1=(1,2,3,4), p_2=(1,2,4,3), .. which runs through all permutations of {1,2,3,4} with period 24; sequence gives position of bell 1 (the treble bell) in n-th permutation.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 3, 3, 4, 4, 4, 3, 3, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 3, 3, 4, 4, 4, 3, 3, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 3, 3, 4, 4, 4, 3, 3, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 3, 3, 4, 4, 4, 3, 3, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2
Offset: 1

Views

Author

Alois P. Heinz, Aug 19 2008

Keywords

Comments

Start with (1,2,3,4), i.e. the first permutation of {1,2,3} followed by 4; then for each next permutation, transpose 4 one to the left; if at position 1, replace {1,2,3} recursively by the next permutation of these numbers. Thereafter, for each next permutation, transpose 4 to the right. And so on.

Examples

			The full list of the 24 permutations is as follows (the present sequence gives position of bell 1):
1 2 3 4
1 2 4 3
1 4 2 3
4 1 2 3
4 1 3 2
1 4 3 2
1 3 4 2
1 3 2 4
3 1 2 4
3 1 4 2
3 4 1 2
4 3 1 2
4 3 2 1
3 4 2 1
3 2 4 1
3 2 1 4
2 3 1 4
2 3 4 1
2 4 3 1
4 2 3 1
4 2 1 3
2 4 1 3
2 1 4 3
2 1 3 4
		

Crossrefs

Programs

  • Maple
    ring:= proc(k::nonnegint) local p,i,left,l,nf, ini; if k<=1 then proc() [1$k] end else ini:= proc() p:= ring(k-1); i:= k; left:= true; l:= p(); nf:= k! end; ini(); proc() local ll; ll:= [seq(l[t], t=1..(i-1)), k, seq(l[t], t=i..(k-1))]; if left then if i>1 then i:= i-1 else left:= false; l:=p() fi else if i indx(bell(4)[modp(n-1,24)+1], 1): seq(a(n), n=1..121);
  • Mathematica
    LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1}, {1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 3, 3, 4, 4, 4, 3}, 105] (* Jean-François Alcover, Mar 15 2021 *)

Formula

Period 24.
From Chai Wah Wu, Jan 15 2020: (Start)
a(n) = a(n-1) - a(n-12) + a(n-13) for n > 13.
G.f.: x*(-2*x^12 - x^10 - x^8 + x^5 - x^3 - 1)/(x^13 - x^12 + x - 1). (End)

A143589 Kolakoski fan based on A000034 with initial row 1.

Original entry on oeis.org

1, 2, 1, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1
Offset: 1

Views

Author

Clark Kimberling, Aug 25 2008

Keywords

Comments

Conjecture (following Benoit Cloitre's conjecture at A111090): if L(n) is the number (assumed finite) of terms in row n of K, then L(n)*(2/3)^n approaches a constant. (L= A143590.)

Examples

			s=(1,2,1,2,1,2,1,2,...) and w=1, so the first 7 rows are
1
2
1 1
2 1
1 1 2
2 1 2 2
1 1 2 1 1 2 2
		

Crossrefs

Formula

Introduced here is an array K called the "Kolakoski fan based on a sequence s with initial row w": suppose that s=(s(1),s(2),...) is a sequence of 1's and 2's and that w=(w(1),w(2),...) is a finite or infinite sequence of 1's and 2's. Assume that s(1)=w(1) and that if w(1)=1 then s contains at least one 2. Row 1 of the array K is w. Subsequent rows are defined inductively: the first term of row n is s(n) and the remaining terms are defined by Kolakoski substitution; viz., each number in row n-1 tells the string-length (1 or 2) of the next string in row n, each term being either 1 or 2.
Showing 1-7 of 7 results.