login
Upper (1/2,1/3) midsequence of (n^2) and (n^3); see Comments.
2

%I #8 Dec 14 2025 15:56:05

%S 0,1,5,14,30,55,90,139,203,284,384,505,648,817,1013,1238,1494,1783,

%T 2106,2467,2867,3308,3792,4321,4896,5521,6197,6926,7710,8551,9450,

%U 10411,11435,12524,13680,14905,16200,17569,19013,20534,22134,23815,25578,27427,29363

%N Upper (1/2,1/3) midsequence of (n^2) and (n^3); see Comments.

%C 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).

%H <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1,0,0,1,-3,3,-1).

%F a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) + a(n-6) - 3*a(n-7) + 3*a(n-8) - a(n-9), with (a(0),...,a(8)) = (0,1,5,14,30,55,90,139,203).

%F G.f.: x*(1 + 2*x + 2*x^2 + 2*x^3 + 2*x^4 + x^5 + 3*x^6 - x^7)/((-1 + x)^4*(1 + x + x^2 + x^3 + x^4 + x^5)).

%e s = A000290 = (0, 1, 4, 9, 16, 25, 36, ...).

%e t = A000578 = (0, 1, 8, 27, 64, 125, 216, ...).

%e u(n) = (0, 0, 4, 13, 29, 54, 90, 138, 202, 283, ...).

%e v(n) = (0, 1, 5, 14, 30, 55, 90, 139, 203, 284, ...).

%t f[n_] := n^2; g[n_] := n^3; r = 1/2; s = 1/3;

%t u[n_] := Floor[r*f[n] + s*g[n]]

%t v[n_] := Ceiling[r*f[n] + s*g[n]]

%t Table[u[n], {n, 0, z}] (* A389582 *)

%t Table[v[n], {n, 0, z}] (* A389583 *)

%t (* Also *)

%t LinearRecurrence[{3,-3,1,0,0,1,-3,3,-1}, {0,0,4,13,29,54,90,138,202}, 30] (* A390582 *)

%t LinearRecurrence[{3,-3,1,0,0,1,-3,3,-1}, {0,1,5,14,30,55,90,139,203}, 30] (* A390583 *)

%Y Cf. A000290, A000578, A389582.

%K nonn,easy

%O 0,3

%A _Clark Kimberling_, Dec 07 2025