login
A390565
a(n) = floor(n^2/3 + n^3/2).
2
0, 0, 5, 16, 37, 70, 120, 187, 277, 391, 533, 705, 912, 1154, 1437, 1762, 2133, 2552, 3024, 3549, 4133, 4777, 5485, 6259, 7104, 8020, 9013, 10084, 11237, 12474, 13800, 15215, 16725, 18331, 20037, 21845, 23760, 25782, 27917, 30166, 32533, 35020, 37632, 40369
OFFSET
0,3
COMMENTS
Suppose that s = (s(n)) and t = (t(n)) are sequences of numbers and h > 0 and k > 0. The 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). This sequence is the (1/3,1/2)-midsequence of (n^2) and (n^3).
FORMULA
a(n) = 2*a(n-1) - a(n-3) - a(n-4) + 2*a(n-6) - a(n-7), with (a(0),...,a(6)) = (0,0,5,16,37,70,120).
G.f.: x^2*(5 + 6*x + 5*x^2 + x^3 + x^4)/((-1 + x)^4*(1 + 2*x + 2*x^2 + x^3)).
EXAMPLE
s = A000290 = (0, 1, 4, 9, 16, 25, 36, ...).
t = A000578 = (0, 1, 8, 27, 64, 125, 216, ...).
u(n) = (0, 0, 5, 16, 37, 70, 120, 187, 277, ...).
v(n) = (0, 1, 6, 17, 38, 71, 120, 188, 278, ...).
MATHEMATICA
s[n_] := n^2 ; t[n_] := n^3; {u1, v1} = {1/3, 1/2};
u[n_] := Floor[u1*s[n] + v1*t[n]]
v[n_] := Ceiling[u1*s[n] + v1*t[n]]
tu = Table[u[n], {n, 0, 60}] (* A390565 *)
tv = Table[v[n], {n, 0, 60}] (* A390566 *)
(* Also *)
LinearRecurrence[{2, 0, -1, -1, 0, 2, -1}, {0, 0, 5, 16, 37, 70, 120}, 30] (* A390565 *)
LinearRecurrence[{3, -3, 1, 0, 0, 1, -3, 3, -1}, {0, 1, 6, 17, 38, 71, 120, 188, 278}, 30] (* A390566 *)
PROG
(Python)
def A390565(n): return n**2*(2+3*n)//6 # Chai Wah Wu, Nov 22 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Nov 19 2025
STATUS
approved