OFFSET
1,2
COMMENTS
For given k and n positive integers, let T(k,n) represent the number of n-tuples of positive integers, whose minimum is zero and maximum is k. In this notation, the sequence corresponds to a(n) = T(4,n).
From Enrique Navarrete, Apr 19 2026: (Start)
Number of n-length strings on {1,2,3,4,5} that contain at least one 4 and at least one 5.
Equivalently, number of onto functions from {1,..,n} to {1,2,3,4,5} such that the image contains the elements {4,5}. (End)
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..1000
O. Bagdasar, On Some Functions Involving the lcm and gcd of Integer Tuples, Scientific publications of the state university of Novi Pazar, Ser. A: Appl. Maths. Inform. and Mech., Vol. 6, 2 (2014), 91-100.
Index entries for linear recurrences with constant coefficients, signature (12,-47,60).
FORMULA
a(n) = 5^n-2*4^n+3^n.
From Colin Barker, Sep 17 2014: (Start)
a(n) = 12*a(n-1)-47*a(n-2)+60*a(n-3).
G.f.: -2*x^2 / ((3*x-1)*(4*x-1)*(5*x-1)).
a(n) = 2*A016753(n-2) for n>1. (End)
From Enrique Navarrete, Apr 19 2026: (Start)
a(n) = 12*a(n-1) - 47*a(n-2) + 60*a(n-3).
E.g.f.: exp(3*x) * (exp(x)-1)^2. (End)
EXAMPLE
For n=2 the a(2)=2 solutions are (0,4) and (4,0).
MATHEMATICA
(* Alternative: *)
LinearRecurrence[{12, -47, 60}, {0, 2, 24}, 25] (* Paolo Xausa, Mar 23 2026 *)
PROG
(PARI) concat(0, Vec(-2*x^2/((3*x-1)*(4*x-1)*(5*x-1)) + O(x^100))) \\ Colin Barker, Sep 17 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ovidiu Bagdasar, Sep 17 2014
EXTENSIONS
More terms from Paolo Xausa, Mar 23 2026
STATUS
approved
