login
A393682
Lower (1/3,1/6) midsequence of (n^2) and ((n+2)^2); see Comments.
2
0, 1, 4, 7, 11, 16, 22, 29, 38, 47, 57, 68, 80, 93, 108, 123, 139, 156, 174, 193, 214, 235, 257, 280, 304, 329, 356, 383, 411, 440, 470, 501, 534, 567, 601, 636, 672, 709, 748, 787, 827, 868, 910, 953, 998, 1043, 1089, 1136, 1184, 1233, 1284, 1335, 1387
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 floor (h*s + k*t).
FORMULA
a(n) = 2*a(n-1) - a(n-2) + a(n-6) - 2*a(n-7) + a(n-8), with (a(0),...,a(7)) = (0,1,4,7,11,16,22,29).
G.f. -((x (1 + 2 x + x^3 + x^4 + x^5))/((-1 + x)^3 (1 + x + x^2 + x^3 + x^4 + x^5))).
a(n) = n^2/2 + 2/3*n + O(1). - Charles R Greathouse IV, May 31 2026
EXAMPLE
s = (n^2) = A000290 = (0, 1, 4, 9, 16, 25, 36, ...).
t = ((n+2)^2) = (4, 9, 16, 25, 36, 49, 64, 81, ...).
u(n) = (0, 1, 4, 7, 11, 16, 22, 29, 38, 47, 57, 68, 80, 93, ...).
v(n) = (1, 2, 4, 8, 12, 17, 23, 30, 38, 48, 58, 69, 81, 94, ...).
MATHEMATICA
f[n_] := n^2; g[n_] := (n+2)^2; r = 1/3; s = 1/6;
u[n_] := Floor[r*f[n] + s*g[n]];
v[n_] := Ceiling[r*f[n] + s*g[n]];
Table[u[n], {n, 0, z}] (* A393682 *)
Table[v[n], {n, 0, z}] (* A393683 *)
(* Also *)
LinearRecurrence[{2, -1, 0, 0, 0, 1, -2, 1}, {0, 1, 4, 7, 11, 16, 22, 29}, 30] (* A393682 *)
LinearRecurrence[{2, -1, 0, 0, 0, 1, -2, 1}, {1, 2, 4, 8, 12, 17, 23, 30}, 30] (* A393683 *)
PROG
(PARI) a(n)=(3*n^2+4*n+[0, -1, 4, 3, 2, 1][n%6+1])/6 \\ Charles R Greathouse IV, May 31 2026
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Clark Kimberling, Mar 24 2026
STATUS
approved