A189826 a(n) = (3^n-n)*(n-1) - 2^n*(n-2).
2, 7, 40, 199, 856, 3359, 12440, 44335, 153808, 523159, 1752928, 5804759, 19041608, 61981807, 200458504, 644783071, 2064276256, 6581953703, 20911793168, 66230028871, 209167217752, 658918365247, 2070973772920, 6495510239759, 20334154874096, 63545035094839
Offset: 1
Keywords
Examples
For n=4, #IDP_n = 199.
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).
Programs
-
Magma
[(3^n-n)*(n-1)-2^n*(n-2): n in [1..30]]; // Vincenzo Librandi, Jun 19 2011
-
Mathematica
LinearRecurrence[{13,-70,202,-337,325,-168,36},{2,7,40,199,856,3359,12440},30] (* Harvey P. Dale, Apr 03 2016 *)
-
PARI
a(n) = (3^n-n)*(n-1)-2^n*(n-2); \\ Altug Alkan, Sep 20 2018
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
Extensions
Simpler name using formula from Joerg Arndt, Sep 20 2018
Comments