login
A393683
Upper (1/3,1/6) midsequence of (n^2) and ((n+2)^2); see Comments.
2
1, 2, 4, 8, 12, 17, 23, 30, 38, 48, 58, 69, 81, 94, 108, 124, 140, 157, 175, 194, 214, 236, 258, 281, 305, 330, 356, 384, 412, 441, 471, 502, 534, 568, 602, 637, 673, 710, 748, 788, 828, 869, 911, 954, 998, 1044, 1090, 1137, 1185, 1234, 1284, 1336, 1388
OFFSET
0,2
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)) = (1, 2, 4, 8, 12, 17, 23, 30).
G.f. (-1 - x^2 - 2 x^3 - x^5 - x^7)/((-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
MATHEMATICA
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, ...).
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+29600\6^(n%6)%6+4)/6 \\ Charles R Greathouse IV, May 31 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Mar 24 2026
STATUS
approved