login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A033490 a(n) = 2*a(n-1) + a(floor(n/2)), with a(1) = 1, a(2) = 2. 2
1, 2, 5, 12, 26, 57, 119, 250, 512, 1050, 2126, 4309, 8675, 17469, 35057, 70364, 140978, 282468, 565448, 1131946, 2264942, 4532010, 9066146, 18136601, 36277511, 72563697, 145136069, 290289607, 580596683, 1161228423, 2322491903, 4645054170, 9290178704, 18580498386 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
MAPLE
A033490 := proc(n) option remember; if n <= 2 then n else A033490(n-1)+A033490(round(2*(n-1)/2))+A033490(round((n-1)/2)); fi; end;
MATHEMATICA
a[n_]:= a[n]= If[n<3, 2^(n-1), 2*a[n-1] + a[Floor[n/2]]]; Table[a[n], {n, 40}] (* G. C. Greubel, Oct 14 2019 *)
PROG
(PARI) a=vector(99, i, i); for(n=3, #a, a[n]=2*a[n-1]+a[n\2]); a \\ Charles R Greathouse IV, Nov 29 2011
(Magma) a:= func< n | n lt 3 select 2^(n-1) else 2*Self(n-1) + Self(Floor(n/2)) >;
[a(n): n in [1..40]]; // G. C. Greubel, Oct 14 2019
(Sage)
@CachedFunction
def a(n):
if (n<3): return 2^(n-1)
else: return 2*a(n-1) +a(floor(n/2))
[a(n) for n in (1..40)] # G. C. Greubel, Oct 14 2019
(GAP)
a:= function(n)
if n<3 then return 2^(n-1);
else return 2*a(n-1) + a(Int(n/2));
fi;
end;
List([1..40], n-> a(n) ); # G. C. Greubel, Oct 14 2019
CROSSREFS
Sequence in context: A228078 A125180 A073778 * A221950 A116716 A128812
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Terms a(30) onward added by G. C. Greubel, Oct 14 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)