login
A245019
Number of ordered n-tuples of positive integers, whose minimum is 0 and maximum is 4.
5
0, 2, 24, 194, 1320, 8162, 47544, 266114, 1448520, 7727522, 40616664, 211117634, 1088079720, 5571427682, 28384443384, 144041002754, 728708854920, 3677645732642, 18524892775704, 93171895169474, 468051525534120, 2349032799986402, 11780285609901624, 59041977251505794, 295772271351877320
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
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.
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).
a(n) = 2*(A021344(n-2) - A021344(n-3)), 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
A245019[n_] := 5^n - 2*4^n + 3^n; Array[A245019, 25] (* Paolo Xausa, Mar 23 2026 *)
(* 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
T(1,n) gives A000918, T(2,n-1) gives A028243, T(n,3) gives A008588, T(n,4) gives A005914.
Cf. A021344.
Sequence in context: A121356 A052780 A385366 * A189769 A208533 A174668
KEYWORD
nonn,easy
AUTHOR
Ovidiu Bagdasar, Sep 17 2014
EXTENSIONS
More terms from Paolo Xausa, Mar 23 2026
STATUS
approved