OFFSET
1,3
MAPLE
A005185 := proc(n)
option remember;
if n<=2 then
1
elif n > procname(n-1) and n > procname(n-2) then
procname(n-procname(n-1))+procname(n-procname(n-2));
end if;
end proc:
A086267 := proc(n)
local H ;
H := A005185(n) ;
%/H ;
3+ floor(%)+ (H mod 6) ;
end proc:
seq(A086267(n), n=1..50) ; # R. J. Mathar, Oct 10 2011
MATHEMATICA
Hofstadter[n_Integer?Positive] := Hofstadter[n] = Hofstadter[n - Hofstadter[n-1]] + Hofstadter[n - Hofstadter[n-2]] Hofstadter[1] = Hofstadter[2] = 1 Digits=502 a=Table[Hofstadter[n], {n, 1, Digits}]; b=Table[Floor[(a[[n]]-2*a[[n+1]]+a[[n+2]]-4)/a[[n]]]+Mod[a[[n]], 6]+3, {n, 1, Digits-2}] ListPlot[b]
CROSSREFS
KEYWORD
nonn,obsc
AUTHOR
Roger L. Bagula, Aug 28 2003
STATUS
approved