OFFSET
0,2
COMMENTS
Suppose that s = (s(n)) and t = (t(n)) are sequences of numbers and h > 0 and k > 0. he lower (h, k)-midsequence of s and t is floor(h*s + k*t); the upper (h, k)-midsequence of s and t is ceiling(h*s + k*t). The lower (1,1/2) midsequence of (n^2) and (n^3) is |A269429|.
LINKS
Index entries for linear recurrences with constant coefficients, signature (3,-2,-2,3,-1).
FORMULA
a(n) = 3*a(n-1) - 2*a(n-2) - 2*a(n-3) + 3*a(n-4) - a(n-5), with (a(0),...,a(4)) = (0,2,8,23,48).
G.f.: x*(2 + 2*x + 3*x^2 - x^3)/((-1 + x)^4*(1 + x)).
EXAMPLE
MATHEMATICA
f[n_] := n^2; g[n_] := n^3; r = 1; s = 1/2;
u[n_] := Floor[r*f[n] + s*g[n]];
v[n_] := Ceiling[r*f[n] + s*g[n]];
Table[u[n], {n, 0, z}] (* |A269429|*)
Table[v[n], {n, 0, z}] (* A392105 *)
(* Also *)
LinearRecurrence[{3, -2, -2, 3, -1}, {0, 1, 8, 22, 48}, 30] (* |A269429| *)
LinearRecurrence[{3, -2, -2, 3, -1}, {0, 2, 8, 23, 48}, 30] (* A392105 *)
PROG
(Python)
def A392105(n): return sum(divmod(n**2*(n+2), 2)) # Chai Wah Wu, Feb 23 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Feb 12 2026
STATUS
approved
