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.
%I A189826 #27 Sep 08 2022 08:45:56 %S A189826 2,7,40,199,856,3359,12440,44335,153808,523159,1752928,5804759, %T A189826 19041608,61981807,200458504,644783071,2064276256,6581953703, %U A189826 20911793168,66230028871,209167217752,658918365247,2070973772920,6495510239759,20334154874096,63545035094839 %N A189826 a(n) = (3^n-n)*(n-1) - 2^n*(n-2). %C A189826 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. %H A189826 Vincenzo Librandi, <a href="/A189826/b189826.txt">Table of n, a(n) for n = 1..1000</a> %H A189826 <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (13,-70,202,-337,325,-168,36). %F A189826 a(n) = (3^n-n)*(n-1) - 2^n*(n-2). %F A189826 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 %e A189826 For n=4, #IDP_n = 199. %t A189826 LinearRecurrence[{13,-70,202,-337,325,-168,36},{2,7,40,199,856,3359,12440},30] (* _Harvey P. Dale_, Apr 03 2016 *) %o A189826 (Magma) [(3^n-n)*(n-1)-2^n*(n-2): n in [1..30]]; // _Vincenzo Librandi_, Jun 19 2011 %o A189826 (PARI) a(n) = (3^n-n)*(n-1)-2^n*(n-2); \\ _Altug Alkan_, Sep 20 2018 %K A189826 nonn %O A189826 1,1 %A A189826 _Adeniji, Adenike_ Apr 28 2011 %E A189826 Simpler name using formula from _Joerg Arndt_, Sep 20 2018