%I #63 Apr 10 2022 15:35:34
%S 2,5,16,41,86,157,260,401,586,821,1112,1465,1886,2381,2956,3617,4370,
%T 5221,6176,7241,8422,9725,11156,12721,14426,16277,18280,20441,22766,
%U 25261,27932,30785,33826,37061,40496,44137,47990,52061,56356,60881,65642,70645
%N a(n) = n^3 - 2*n^2 + 2*n + 1.
%C The original definition was "Identity difference partial one - one transformation semigroup is a semigroup having the property that the difference between max im(alpha) and min im(alpha) is not greater than 1. This is denoted by S = IDI_n for each n." [Needs editing.]
%C For all n >= 3, a(n) expressed in base n has the three digits n-2, 2, and 1; for example, a(16) in hexadecimal is "E21". For all n >= 3, a(n+1) expressed in base n is "1112". For all n >= 7, a(n+2) expressed in base n is "1465". - _Mathew Englander_, Jan 07 2021
%H Vincenzo Librandi, <a href="/A188947/b188947.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1).
%F a(n) = (n+1) + n*(n-1)^2 = n^3 - 2*n^2 + 2*n + 1 = 1 + A053698(n-1).
%F G.f.: ( -x*(-2 + 3*x - 8*x^2 + x^3) ) / ( (x-1)^4 ). - _R. J. Mathar_, Apr 14 2011
%F a(n) = A060354(n) + A162607(n+1). - _Lechoslaw Ratajczak_, Sep 24 2020
%F E.g.f.: exp(x)*(1 + x)*(1 + x^2) - 1. - _Stefano Spezia_, Apr 10 2022
%t A188947[n_] := n^3 - 2*n^2 + 2*n + 1; Table[A188947[n], {n, 1, 42}] (* _Robert P. P. McKone_, Jan 31 2021 *)
%o (Magma) [n^3 - 2*n^2 + 2*n + 1: n in [1..30]]; // _Vincenzo Librandi_, May 01 2011
%o (PARI) a(n)=n^3-2*n^2+2*n+1 \\ _Charles R Greathouse IV_, Oct 07 2015
%Y Cf. A027444, A053698, A056106 (first differences), A060354, A162607, A188377, A188716.
%K nonn,easy
%O 1,1
%A _Adeniji, Adenike_, Apr 14 2011
%E Edited by _N. J. A. Sloane_, Apr 23 2011