login
A393347
Upper (1,1/3) midsequence of (n^2) and (n^3); see Comments.
2
0, 2, 7, 18, 38, 67, 108, 164, 235, 324, 434, 565, 720, 902, 1111, 1350, 1622, 1927, 2268, 2648, 3067, 3528, 4034, 4585, 5184, 5834, 6535, 7290, 8102, 8971, 9900, 10892, 11947, 13068, 14258, 15517, 16848, 18254, 19735, 21294, 22934, 24655, 26460, 28352, 30331
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 ceiling(h*s + k*t).
FORMULA
a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3) - 3*a(n-4) + 3*a(n-5) - a(n-6), with (a(0),...,a(5)) = (0,2,7,18,38,67).
G.f.: x*(2 + x + 3*x^2 + x^3 - x^4)/((-1 + x)^4*(1 + x + x^2)).
EXAMPLE
s = A000290 = (0, 1, 4, 9, 16, 25, 36, ...).
t = A000578 = (0, 1, 8, 27, 64, 125, 216, ...).
u(n) = (0, 1, 6, 18, 37, 66, 108, 163, 234, 324, 433, 564, 720, ...).
v(n) = (0, 2, 7, 18, 38, 67, 108, 164, 235, 324, 434, 565, 720, ...).
MATHEMATICA
f[n_] := n^2; g[n_] := n^3; r = 1; s = 1/3;
u[n_] := Floor[r*f[n] + s*g[n]];
v[n_] := Ceiling[r*f[n] + s*g[n]];
Table[u[n], {n, 0, z}] (* A393346 *)
Table[v[n], {n, 0, z}] (* A393347 *)
(* Also *)
LinearRecurrence[{3, -3, 2, -3, 3, -1}, {0, 1, 6, 18, 37, 66}, 50] (* A393346 *)
LinearRecurrence[{3, -3, 2, -3, 3, -1}, {0, 2, 7, 18, 38, 67}, 50] (* A393347 *)
PROG
(Python)
def A393347(n): return (lambda x:x[0]+bool(x[1]))(divmod(n**2*(n+3), 3)) # Chai Wah Wu, Feb 23 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Feb 12 2026
STATUS
approved