OFFSET
0,2
COMMENTS
Order preserving identity difference partial one - one transformation semigroup, OIDI_n is defined if for each transformation, alpha, x<= y implies xalpha <= yalpha, for all x,y in X_n (set of natural numbers) and also the absolute value of the difference between max(Im(alpha)) and min(Im(alpha)) is less than or equal to one with non-isolation property.
a(n) is the number of ternary strings of length n with none or two 0's, none or one 1's and any number of 2's. a(7) = 134 since the strings are the 105 permutations of 0012222, the 21 permutations of 0022222, the 7 permutations of 1222222 and 2222222. - Enrique Navarrete, Oct 12 2025
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
G.f.: (2*x^3+2*x^2-2*x+1) / (x-1)^4. - R. J. Mathar, Jun 20 2011
E.g.f.: (1/2)*(2 + 2*x + x^2 + x^3)*exp(x). - G. C. Greubel, Jan 13 2018 [corrected by Enrique Navarrete, Oct 12 2025]
a(n) = 4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4). - Wesley Ivan Hurt, Apr 23 2021
a(n) = 3*binomial(n,3) + binomial(n,2) + n + 1. - Enrique Navarrete, Oct 12 2025
EXAMPLE
For n = 4, a(4) = (4^3-2*4^2+3*4+2)/2 = 46/2 = 23.
MATHEMATICA
Table[(n^3-2*n^2+3*n+2)/2, {n, 1, 50}] (* or *) LinearRecurrence[{4, -6, 4, -1}, {2, 4, 10, 23}, 50] (* G. C. Greubel, Jan 13 2018 *)
PROG
(Magma) [(n^3-2*n^2+3*n+2)/2: n in [1..50]]; // Vincenzo Librandi, May 07 2011
(PARI) a(n)=(n^3-2*n^2+3*n+2)/2 \\ Charles R Greathouse IV, Oct 16 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Adeniji, Adenike and Samuel Makanjuola(somakanjuola(AT)unilorin.edu.ng), Apr 30 2011
EXTENSIONS
a(0)=1 prepended by Alois P. Heinz, Oct 12 2025
STATUS
approved
