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