OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
MAPLE
MATHEMATICA
a[n_]:= a[n]= If[n<2, 1, a[n-1] +a[Round[2*(n-1)/3]] +a[Round[(n-1)/3]]];
Table[a[n], {n, 50}] (* G. C. Greubel, Oct 14 2019 *)
PROG
(PARI) a(n) = if(n<2, 1, a(n-1)+a(round(2*(n-1)/3)) +a(round((n-1)/3)) );
vector(50, n, a(n) ) \\ G. C. Greubel, Oct 14 2019
(Magma) a:= func< n | n lt 2 select 1 else Self(n-1) + Self(Round(2*(n-1)/3)) + Self(Round((n-1)/3)) >;
[a(n): n in [1..50]]; // G. C. Greubel, Oct 14 2019
(Sage)
@CachedFunction
def a(n):
if (n<2): return 1
else: return a(n-1) +a(round(2*(n-1)/3)) +a(round((n-1)/3))
[a(n) for n in (1..50)] # G. C. Greubel, Oct 14 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Terms a(39) and onward added by G. C. Greubel, Oct 14 2019
STATUS
approved