|
|
A295556
|
|
a(n) = 0 for n <= 1; thereafter a(n) = a(floor(n/2)) + a(ceiling(n/2)) + floor(n/2) if n not congruent to 0 mod 4, a(n) = a(n/2-1) + a(n/2+1) + n/2 if n == 0 (mod 4).
|
|
0
|
|
|
0, 0, 1, 2, 4, 5, 7, 9, 11, 13, 15, 17, 20, 22, 25, 27, 30, 32, 35, 37, 40, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99, 102, 105, 108, 112, 115, 119, 122, 126, 129, 133, 136, 140, 143, 147, 150, 154, 157, 161, 164, 168
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
LINKS
|
|
|
MAPLE
|
f:=proc(n) option remember;
if n <= 1 then 0
elif (n mod 4 = 0) then f(n/2-1)+f(n/2+1)+n/2;
else f(floor(n/2))+f(ceil(n/2))+floor(n/2);
fi; end;
[seq(f(n), n=0..60)];
|
|
MATHEMATICA
|
a[n_] := a[n] = If[Mod[n, 4] == 0, a[n/2 -1] + a[n/2 +1] + n/2, a[Floor[n/2]] + a[Ceiling[n/2]] + Floor[n/2]]; a[0] = a[1] = 0; Array[a, 61, 0] (* Robert G. Wilson v, Dec 10 2017 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|