login
A389320
Upper (3/4)-midsequence of square numbers and negative triangular numbers; see Comments.
3
0, 0, 1, 3, 5, 8, 12, 16, 21, 27, 34, 42, 50, 59, 69, 79, 90, 102, 115, 129, 143, 158, 174, 190, 207, 225, 244, 264, 284, 305, 327, 349, 372, 396, 421, 447, 473, 500, 528, 556, 585, 615, 646, 678, 710, 743, 777, 811, 846, 882, 919, 957, 995, 1034, 1074, 1114
OFFSET
0,4
COMMENTS
Suppose that s = (s(n)) and t = (t(n)) are sequences of numbers and r > 0. The lower (r)-midsequence of s and t is given by u = floor(r*(s + t)); the upper r-midsequence of s and t is given by v = ceiling(r*(s + t)). If s and t are linearly recurrent and r is rational, then u and v are linearly recurrent.
FORMULA
a(n) = ceiling((3/8)*(n^2 - n)).
a(n) = 3*a(n-1) - 4*a(n-2) + 4*a(n-3) - 4*a(n-4) + 4*a(n-5) - 4*a(n-6) + 4*a(n-7) - 3*a(n-8) + a(n-9), with (a(0),...,a(8)) = (0, 0, 1, 3, 5, 8, 12, 16, 21).
EXAMPLE
s = (n^2) = A000290 = (0, 1, 4, 9, 16, 25, ...).
t = -(n*(n+1)/2) = -A000217 = (0, -1, -3, -6, -10, -15, ...).
u(n) = floor((3/4)*(0-0, 1-1, 4-3, 9-6, 16-10, ...)) = (0, 0, 0, 2, 4, 7, 11, 15, ...).
v(n) = ceiling((3/4)*(0-0, 1-1, 4-3, 9-6, 16-10, ...)) = (0, 0, 1, 3, 5, 8, 12, 16, ...).
MATHEMATICA
s[n_] := n^2; t[n_] := - n (n + 1)/2; r = 3/4;
u[n_] := Floor[r*(s[n] + t[n])];
v[n_] := Ceiling[r*(s[n] + t[n])];
Table[u[n], {n, 0, 60}] (* A389319 *)
Table[v[n], {n, 0, 60}] (* A389320 *)
PROG
(Python)
def A389320(n): return (3*n*(n-1)-1>>3)+1 # Chai Wah Wu, Nov 08 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Nov 02 2025
STATUS
approved