OFFSET
0,2
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..5000
MAPLE
b:=proc(n) option remember; if n<=2 then 1 else b(b(n-2))+b(n-b(n-2)): fi: end: seq(b(n), n=1..75): a[0]:=1: for n from 1 to 70 do a[n]:=b(n)+b(n+2) od: seq(a[n], n=0..70);
MATHEMATICA
M[n_]:= M[n]= If[n<3, 1 -Boole[n==0], M[M[n-2]] + M[n -M[n-2]]];
L[n_]:= L[n]= If[n==1, 1, M[n-1] + M[n+1]];
Table[L[n], {n, 100}] (* modified by G. C. Greubel, Mar 28 2022 *)
PROG
(Sage)
@CachedFunction
def b(n): # A005229
if (n<3): return 1
else: return b(b(n-2)) + b(n-b(n-2))
def A116591(n): return b(n+2) +b(n) -bool(n==0)
[A116591(n) for n in (0..100)] # G. C. Greubel, Mar 28 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Mar 27 2006
EXTENSIONS
Edited by N. J. A. Sloane, Apr 15 2006
STATUS
approved