OFFSET
1,2
REFERENCES
F. Disanto, A. Frosini, S. Rinaldi, Square Involutions, Proceedings of Permutation Patterns, July 13-17, 2009, Florence.
T. Mansour, S. Severini, Grid polygons from permutations and their enumeration by the kernel method, 19th Conference on Formal Power Series and Algebraic Combinatorics, Tianjin, China, July 2-6, 2007.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
F. Disanto, A. Frosini, S. Rinaldi, Square involutions, J. Int. Seq. 14 (2011) # 11.3.5.
T. Mansour, S. Severini, Grid polygons from permutations and their enumeration by the kernel method, arXiv:math/0603225 [math.CO], 2006.
FORMULA
a(n) = (n+2)*2^(n-3) - (n-2)*C(n-3,(n-3)/2), n > 1.
G.f.: x*(1-x)^2/(1-2*x)^2 - x^3/((1-2*x)*sqrt(1-4*x^2)).
(n-3)*(n-8)*a(n) + 2*(-n^2 + 10*n - 20)*a(n-1) + 4*(-n^2 + 12*n - 31)*a(n-2) + 8*(n-4)*(n-7)*a(n-3) = 0.- R. J. Mathar, Jul 24 2012
EXAMPLE
a(5)=22, in fact the 22 square involutions of 5 are given by all the involutions of 5, which are 26, minus 14325, 15342, 52341, 42315 which are not square.
MATHEMATICA
Rest[CoefficientList[Series[x(1-x)^2/(1-2x)^2 - x^3/((1-2x) Sqrt[1-4x^2]), {x, 0, 29}], x]] (* Michael De Vlieger, Nov 25 2018 *)
PROG
(PARI) my(x='x+O('x^30)); Vec(x*(1-x)^2/(1-2*x)^2 - x^3/((1-2*x)*sqrt(1- 4*x^2))) \\ G. C. Greubel, Nov 25 2018
(Magma) m:=30; R<x>:=PowerSeriesRing(Rationals(), m); Coefficients(R!( x*(1-x)^2/(1-2*x)^2 - x^3/((1-2*x)*Sqrt(1-4*x^2)) )); // G. C. Greubel, Nov 25 2018
(Sage) s=(x*(1-x)^2/(1-2*x)^2 -x^3/((1-2*x)*sqrt(1-4*x^2))).series(x, 30); a= s.coefficients(x, sparse=False); a[1:] # G. C. Greubel, Nov 25 2018
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Simone Rinaldi (rinaldi(AT)unisi.it), Sep 04 2009
STATUS
approved