

A256137


a(2) = 1; a(3) = 4; for n >= 4, a(n) = 2 + Sum_{i=4..n} d(i), where d(i) = i for even i, d(i) = i3 for odd i.


1



1, 4, 6, 8, 14, 18, 26, 32, 42, 50, 62, 72, 86, 98, 114, 128, 146, 162, 182, 200, 222, 242, 266, 288, 314, 338, 366, 392, 422, 450, 482, 512, 546, 578, 614, 648, 686, 722, 762, 800, 842, 882, 926, 968, 1014, 1058, 1106, 1152, 1202, 1250, 1302, 1352, 1406
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

2,2


LINKS



FORMULA

a(2) = 1; a(3) = 4; for n >= 4, a(n) = 2 + Sum_{i=4..n} d(i), where d(i) = i for even i, d(i) = i3 for odd i.
a(n) = (5+3*(1)^n4*n+2*n^2)/4 for n>3.
a(n) = (n^22*n+4)/2 for n even and n>3.
a(n) = (n^22*n+1)/2 for n odd and n>3.
a(n) = 2*a(n1)2*a(n3)+a(n4) for n>6.
G.f.: x^2*(2*x^55*x^4+2*x^3+2*x^22*x1) / ((x1)^3*(x+1)).
(End)


MATHEMATICA

Prepend[Table[2 + Sum[If[EvenQ@ i, i, i  3], {i, 3, n}], {n, 3, 48}], 1] (* Michael De Vlieger, Jul 12 2015 *)
Join[{1, 2, 6, 8, 14, 18}, LinearRecurrence[{2, 0, 2, 1}, {26, 32, 42, 50}, 50]] (* Vincenzo Librandi, Jul 16 2015 *)


PROG

(PARI) a=4; print1("1, ", a, ", "); for (n=4, 100, if (Mod(n, 2)==0, d=n, d=n3); a=a+d; print1(a, ", "))
(PARI) Vec(x^2*(2*x^55*x^4+2*x^3+2*x^22*x1)/((x1)^3*(x+1)) + O(x^100)) \\ Colin Barker, Jul 12 2015 and Aug 20 2015


CROSSREFS



KEYWORD

nonn,easy


AUTHOR



STATUS

approved



