OFFSET
0,4
COMMENTS
liminf a(n)/n^2 = 1/10; in fact a(n) >= (n^2+3n)/10 for all n, and this bound is tight.
limsup a(n)/n^2 = 1/7; in fact a(n) <= (n^2+3n+3)/7 for all n, and this bound is tight.
Although it is not immediately obvious from the definition, the sequence is increasing (but not strictly increasing).
REFERENCES
Message from Peter Hajnal to the author, June 22 2008.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..20000
FORMULA
a(n) = 10*4^i + (n+1)(n+2) - (6n+9)*2^i, if 3*2^i <= n < 4*2^i; a(n) = (6n+9)*2^i - 14*4^i - (n+1)(n+2)/2, if 4*2^i <= n < 6*2^i.
MAPLE
a:= proc(n) option remember; `if`(n<2, n, (h->
(1+2*m)*a(h)+(3-2*m)*a(h-1))(iquo(n, 2, 'm')))
end:
seq(a(n), n=0..60); # Alois P. Heinz, Feb 18 2023
MATHEMATICA
nn = 120; Array[Set[a[#], #] &, 2, 0]; Do[Set[a[n], If[EvenQ[n], a[#] + 3 a[# - 1] &[n/2], 3 a[#] + a[# - 1] &[(n - 1)/2]]], {n, 2, nn}]; Array[a, nn + 1, 0] (* Michael De Vlieger, Feb 18 2023 *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Jeffrey Shallit, Feb 18 2023
STATUS
approved