This site is supported by donations to The OEIS Foundation.

 Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing. Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A048162 Expansion of (1 - x + 3*x^3 - 2*x^4 - 3*x^5)/(1 - 2*x + x^3). 2
 1, 1, 2, 6, 9, 13, 20, 31, 49, 78, 125, 201, 324, 523, 845, 1366, 2209, 3573, 5780, 9351, 15129, 24478, 39605, 64081, 103684, 167763, 271445, 439206, 710649, 1149853, 1860500, 3010351, 4870849, 7881198, 12752045, 20633241, 33385284 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS Number of permutations of 1..n such that each position is fixed or moves to an adjacent position (with n considered adjacent to 1). For example, a(4) = 9 because there is the identity; 2 cyclic permutations; 4 swaps of one pair of adjacent entries; and 2 swaps of two pairs of adjacent entries. - Joshua Zucker, Nov 13 2003 REFERENCES Lehmer, D. H.; Permutations with strongly restricted displacements. Combinatorial theory and its applications, II (Proc. Colloq., Balatonfured, 1969), pp. 755-770. North-Holland, Amsterdam, 1970. LINKS FORMULA For n>4, a(n) = a(n-1) + a(n-2) - 2. - Joshua Zucker, Nov 13 2003 a(n) = Fibonacci(n+1) + Fibonacci(n-1) + 2, for n>2. - Jessa Lee (jessal(AT)comcast.net), Nov 25 2003 For n > 2, a(n)=A001610(n-1) - 3. - Toby Gottfried, Apr 13 2013 MATHEMATICA CoefficientList[Series[(1-x+3x^3-2x^4-3x^5)/(1-2x+x^3), {x, 0, 40}], x] (* or *) Join[{1, 1, 2}, #[[3]]+#[[1]]+2&/@Partition[Fibonacci[Range[2, 50]], 3, 1]] (* Harvey P. Dale, Apr 06 2017 *) CROSSREFS 3rd column of A008305. Cf. A001610. Sequence in context: A076522 A094111 A181021 * A226823 A171866 A297833 Adjacent sequences:  A048159 A048160 A048161 * A048163 A048164 A048165 KEYWORD nonn AUTHOR EXTENSIONS Second formula corrected by David Radcliffe, Jan 16 2011 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 16 00:33 EST 2019. Contains 330013 sequences. (Running on oeis4.)