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

%I #8 Mar 27 2026 00:02:03

%S 1,3,7,12,20,28,39,51,65,80,98,116,137,159,183,208,236,264,295,327,

%T 361,396,434,472,513,555,599,644,692,740,791,843,897,952,1010,1068,

%U 1129,1191,1255,1320,1388,1456,1527,1599,1673,1748,1826,1904,1985,2067,2151

%N Lower (1/2,1/3) midsequence of (n^2) and ((n+2)^2); 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_06">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,0,-1,-1,1).

%F a(n) = a(n-1) + a(n-2) - a(n-4) - a(n-5) + a(n-6), with (a(0),...,a(5)) = (1, 3, 7, 12, 20, 28).

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

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

%e t = ((n+2)^2) = (4, 9, 16, 25, 36, 49, 64, 81, ...).

%e u(n) = (1, 3, 7, 12, 20, 28, 39, 51, 65, 80, 98, 116, 137, ...).

%e v(n) = (2, 4, 8, 13, 20, 29, 40, 52, 66, 81, 98, 117, 138, ...).

%t f[n_] := n^2; g[n_] := (n+2)^2; 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, 50}] (* A393680 *)

%t Table[v[n], {n, 0, 50}] (* A393681 *)

%t (* Also *)

%t LinearRecurrence[{1,1,0,-1,-1,1}, {1, 3, 7, 12, 20, 28}, 50] (* A393680 *)

%t LinearRecurrence[{2,-1,0,0,0,1,-2,1}, {2, 4, 8, 13, 20, 29}, 50] (* A393681 *)

%Y Cf. A000290, A000578, A393680, A393681.

%K nonn,easy

%O 0,2

%A _Clark Kimberling_, Mar 20 2026