OFFSET
1,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..5000
MATHEMATICA
Hc[n_]:= Hc[n] = If[n<3, 1, Hc[(n - Hc[n-1])*(Mod[n, 2]) + Hc[n-1]*(1 -Mod[n, 2])] + Hc[(n - Hc[n-2])*(Mod[n, 2]) + (n - Hc[n-1])*(1 - Mod[n, 2])]];
Table[Hc[n], {n, 100}]
PROG
(SageMath)
@CachedFunction
def Hc(n):
if (n<3): return 1
else: return Hc((n - Hc(n-1))*(n%2) + Hc(n-1)*(1-(n%2))) + Hc((n - Hc(n-2))*(n%2) + (n - Hc(n-1))*(1 -(n%2)))
[Hc(n) for n in range(1, 100)] # G. C. Greubel, Dec 05 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Sep 15 2003
EXTENSIONS
Edited by G. C. Greubel, Dec 05 2022
STATUS
approved