OFFSET
1,3
COMMENTS
Zeckendorf (Fibonacci) expansion of n (A003714) reinterpreted as a factorial expansion.
Also positions in A055089, A060117 and A060118 of the permutations that are composed of disjoint adjacent transpositions only. (That these positions are same can be seen by comparing algorithms PermRevLexUnrankAMSD, PermUnrank3R, PermUnrank3L in the respective sequences). Thus also positions of the fixed terms in A065181-A065184. See comment at A065163.
Written as disjoint cycles the permutations are: (), (1 2), (2 3), (3 4), (1 2)(3 4), (4 5), (1 2)(4 5), (2 3)(4 5), etc. Apart from the first one (the identity), these are the only kind of permutations used in campanology when moving from one "change" to next.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Arthur T. White, Ringing the Changes, Math. Proc. Camb. Phil. Soc., September 1983, Vol. 94, part 2, pp. 203-215.
FORMULA
a(n) = PermRevLexRank(CampanoPerm(n))
a(A001611(n)) = (n-1)! for n > 2. - David A. Corneth, Jun 25 2017
EXAMPLE
Zeckendorf Expansions of first few natural numbers and the corresponding values when interpreted as factorial expansions: 0 = 0 = 0, 1 = 1 = 1, 2 = 10 = 2, 3 = 100 = 6, 4 = 101 = 7, 5 = 1000 = 24, 6 = 1001 = 25, 7 = 1010 = 26, 8 = 10000 = 120, etc.,
MAPLE
CampanoPerm := proc(n) local z, p, i; p := []; z := fibbinary(n); i := 1; while(z > 0) do if(1 = (z mod 2)) then p := permul(p, [[i, i+1]]); fi; i := i+1; z := floor(z/2); od; RETURN(convert(p, 'permlist', i)); end;
MATHEMATICA
With[{b = MixedRadix[Range[12, 2, -1]]}, FromDigits[#, b] & /@ Select[Tuples[{0, 1}, 8], SequenceCount[#, {1, 1}] == 0 &]] (* Michael De Vlieger, Jun 26 2017 *)
PROG
(PARI) fill(lim, k, val)=if(k>#f, return); my(t=val+f[k]); if(t<=lim, listput(v, t); fill(lim, k+2, t)); fill(lim, k+1, val)
list(lim)=my(k, t=1); local(f=List(), v=List([0])); while((t*=k++)<=lim, listput(f, t)); f=Vecrev(f); fill(lim, 1, 0); Set(v) \\ Charles R Greathouse IV, Jun 25 2017
(PARI) first(n) = my(res = [0, 1], k = 1, t = 1, p = 1); while(#res < n, k++; t++; p *= t; res = concat(res, vector(fibonacci(k), i, res[i]+p))); vector(n, i, res[i]) \\ David A. Corneth, Jun 26 2017
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
Antti Karttunen, Mar 01 2001
STATUS
approved