OFFSET
1,1
COMMENTS
Previous name was: Identity difference partial transformation semigroup, IDP_n is obtained by taking the absolute value of the difference between the max(Im(alpha)) and min(Im(alpha)) <= 1. The number of elements for each n is denoted by #IDP_n.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (13,-70,202,-337,325,-168,36).
FORMULA
a(n) = (3^n-n)*(n-1) - 2^n*(n-2).
G.f.: -x*(2 - 19*x + 89*x^2 - 235*x^3 + 329*x^4 - 210*x^5 + 36*x^6) / ( (3*x-1)^2 *(2*x-1)^2 *(x-1)^3 ). - R. J. Mathar, Jun 20 2011
EXAMPLE
For n=4, #IDP_n = 199.
MATHEMATICA
LinearRecurrence[{13, -70, 202, -337, 325, -168, 36}, {2, 7, 40, 199, 856, 3359, 12440}, 30] (* Harvey P. Dale, Apr 03 2016 *)
PROG
(Magma) [(3^n-n)*(n-1)-2^n*(n-2): n in [1..30]]; // Vincenzo Librandi, Jun 19 2011
(PARI) a(n) = (3^n-n)*(n-1)-2^n*(n-2); \\ Altug Alkan, Sep 20 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Adeniji, Adenike Apr 28 2011
EXTENSIONS
Simpler name using formula from Joerg Arndt, Sep 20 2018
STATUS
approved