login
A396835
Upper (2/3,1/3) midsequence of (floor[n/2]^2) and (ceiling[n/2]^2); see Comments.
1
0, 1, 1, 2, 4, 6, 9, 12, 16, 19, 25, 29, 36, 41, 49, 54, 64, 70, 81, 88, 100, 107, 121, 129, 144, 153, 169, 178, 196, 206, 225, 236, 256, 267, 289, 301, 324, 337, 361, 374, 400, 414, 441, 456, 484, 499, 529, 545, 576, 593, 625, 642, 676, 694, 729, 748, 784, 803, 841, 861, 900
OFFSET
0,4
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, 1, 1, 2, 4, 6, 9, 12, 16).
G.f.: x*(-1 - 2*x^3 - x^4 - x^5 - x^7)/((-1 + x)^3*(1 + x)^2*(1 + x^2 + x^4)).
a(n) = floor((6*n^2 - 2*n + 15 + (-1)^n*(2*n - 7))/24). - Hoang Xuan Thanh, Jun 20 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, 2, 4, 5, 9, 11, 16, 19, 25, 28, 36, 40, 49, ...).
(v(n)) = (0, 1, 1, 2, 4, 6, 9, 12, 16, 19, 25, 29, 36, 41, 49, ...).
MATHEMATICA
z = 60; f[n_] := Floor[n/2]^2; g[n_] := Ceiling[n/2]^2;
r = 2/3; s = 1/3;
v[n_] := Ceiling[r*f[n] + s*g[n]]
Table[v[n], {n, 0, z}]
(* Alternative: *)
LinearRecurrence[{1, 1, -1, 0, 0, 1, -1, -1, 1}, {0, 1, 1, 2, 4, 6, 9, 12, 16}, 60]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 19 2026
STATUS
approved