login
A396812
Upper (1,1/2) midsequence of (floor[n/2]^2) and (ceiling[n/2]^2); see Comments.
5
0, 1, 2, 3, 6, 9, 14, 17, 24, 29, 38, 43, 54, 61, 74, 81, 96, 105, 122, 131, 150, 161, 182, 193, 216, 229, 254, 267, 294, 309, 338, 353, 384, 401, 434, 451, 486, 505, 542, 561, 600, 621, 662, 683, 726, 749, 794, 817, 864, 889, 938, 963, 1014, 1041, 1094, 1121, 1176, 1205, 1262, 1291, 1350
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).
FORMULA
a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-6) - a(n-7) - a(n-8) + a(n-9), with (a(0),...,a(8)) = (0, 0, 1, 3, 6, 9, 14, 17).
G.f.: x*(1 + x + 2*x^3 + x^4 + x^5)/((1 - x)^3*(1 + x)^2*(1 + x^2)).
a(n) - a(n-1) = A215495(n-1). - R. J. Mathar, Jun 30 2026
EXAMPLE
s(n) = A008794(n+1): (0, 1, 1, 4, 4, 9, 9, 16, 16, ...).
t(n) = A008794(n+2): (1, 1, 4, 4, 9, 9, 16, 16, 25, ...).
(u(n)) = (0, 0, 1, 3, 6, 8, 13, 17, 24, 28, 37, 43, 54, 60, ...).
(v(n)) = (0, 1, 2, 3, 6, 9, 14, 17, 24, 29, 38, 43, 54, 61, ...).
MATHEMATICA
z = 60; f[n_] := Floor[n/2]^2; g[n_] := Ceiling[n/2]^2;
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}]
Table[v[n], {n, 0, z}]
(* Also *)
LinearRecurrence[{1, 1, -1, 1, -1, -1, 1}, {0, 0, 1, 3, 6, 8, 13}, 30]
LinearRecurrence[{1, 1, -1, 1, -1, -1, 1}, {0, 1, 2, 3, 6, 9, 14, 17}, 30]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 15 2026
STATUS
approved