OFFSET
1,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
MATHEMATICA
Hofstadter[n_]:= Hofstadter[n]= If[n<3, 1, Hofstadter[n-Hofstadter[n- 1]] + Hofstadter[n-Hofstadter[n-2]]];
a[n_]:= a[n]= If[n==1, 2, a[n-1] +2*Hofstadter[n+1]];
Table[a[n], {n, 60}]
PROG
(SageMath)
@CachedFunction
def H(n): return 1 if (n<3) else H(n-H(n-1)) + H(n-H(n-2))
def a(n): return 2 if (n==1) else a(n-1) + 2*H(n+1)
[a(n) for n in range(1, 61)] # G. C. Greubel, Dec 19 2022
CROSSREFS
KEYWORD
nonn,less
AUTHOR
Roger L. Bagula, Jul 05 2005
STATUS
approved