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.

A268306 The number of even permutations p of 1,2,...,n such that -1<=p(i)-i<=2 for i=1,2,...,n.

This page as a plain text file.
%I A268306 #16 Jul 23 2025 15:39:55
%S A268306 1,1,2,4,7,12,22,41,75,137,252,464,853,1568,2884,5305,9757,17945,
%T A268306 33006,60708,111659,205372,377738,694769,1277879,2350385,4323032,
%U A268306 7951296,14624713,26899040,49475048,90998801,167372889,307846737,566218426
%N A268306 The number of even permutations p of 1,2,...,n such that -1<=p(i)-i<=2 for i=1,2,...,n.
%H A268306 Colin Barker, <a href="/A268306/b268306.txt">Table of n, a(n) for n = 1..1000</a>
%H A268306 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1,2,-1,0,-1).
%F A268306 a(n) = A133872(n)/2 + A000073(n+2)/2.
%F A268306 G.f.: x*(1-x+x^2-x^3-x^5) / ((1-x)*(1+x^2)*(1-x-x^2-x^3)). - _Colin Barker_, Jan 31 2016
%e A268306 There exist two even permutations p of 1,2,3 such that -1<=p(i)-i<=2 for i=1,2,3: (123) and (312), therefore a(3)=2.
%t A268306 CoefficientList[Series[(1 - x + x^2 - x^3 - x^5)/((1 - x) (1 + x^2) (1 - x - x^2 - x^3)), {x, 0, 34}], x] (* _Michael De Vlieger_, Feb 01 2016 *)
%o A268306 (Maxima) t1:0$ t2:0$ t3:1$  for i:1 thru 100 do (a:1/2+sin((2*i+1)*%pi/4)/sqrt(2),
%o A268306 t:t1+t2+t3, t1:t2, t2:t3, t3:t, e:(t+a)/2, print(e));
%o A268306 (PARI) Vec(x*(1-x+x^2-x^3-x^5)/((1-x)*(1+x^2)*(1-x-x^2-x^3)) + O(x^50)) \\ _Colin Barker_, Jan 31 2016
%Y A268306 Cf. A133872, A000073, A001710, A003221.
%K A268306 easy,nonn
%O A268306 1,3
%A A268306 _Dmitry Efimov_, Jan 31 2016