login
"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.
5

%I #19 Mar 01 2024 10:26:59

%S 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,

%T 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,

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

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

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

%H Richard Duckworth and Fabian Stedman, <a href="http://www.gutenberg.org/files/18567/18567-h/18567-h.htm">Tintinnalogia, or, the Art of Ringing</a>, (1671). Released by Project Gutenberg, 2006.

%H <a href="/index/Be#bell_ringing">Index entries for sequences related to bell ringing</a>

%H <a href="/index/Rec#order_21">Index entries for linear recurrences with constant coefficients</a>, signature (2,-2,1,0,0,-1,2,-2,1,0,0,-1,2,-2,1,0,0,-1,2,-2,1).

%F Period 24.

%F From _Chai Wah Wu_, Jan 15 2020: (Start)

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

%F 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)

%p 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<k then i:= i+1 else left:= true; l:=p() fi fi; nf:= nf-1; if nf = 0 then ini() fi; ll end fi end: bell := proc(k) option remember; local p; p:= ring(k); [seq(p(), i=1..k!)] end: a := n-> bell(4)[modp(n-1,24)+1][2]: seq (a(n), n=1..121);

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

%Y Cf. A143484-A143490, A090281.

%K nonn,easy

%O 1,1

%A _Alois P. Heinz_, Aug 19 2008