OFFSET
0,4
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = a(a(n - 1)) + r(n) for n >= 3, where r(3*k) = a(a(k)), r(3*k+1) = a(a(k)) and r(3*k+2) = a(n-a(k)), with a(0) = 0 and a(1) = a(2) = 1.
MATHEMATICA
a[n_]:= a[n]= If[n<3, Floor[(n+1)/2], a[a[n-1]] + If[Mod[n, 3]<2, a[a[Floor[n/3]]], a[n - a[Floor[n/3]]]]];
Table[f[n], {n, 0, 100}]
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Nov 09 2008
EXTENSIONS
Applied OEIS standards to nomenclature - The Assoc. Editors of the OEIS, Oct 18 2009
Name edited by Petros Hadjicostas, Apr 11 2020
STATUS
approved