OFFSET
1,4
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..500
FORMULA
a(n) = a(n-1) - A004001(n)*a(n-2), with a(1) = a(2) = 1.
MATHEMATICA
HC[n_]:= HC[n]= If[n<3, Fibonacci[n], HC[HC[n-1]] +HC[n -HC[n-1]]]; (*A004001*)
a[n_]:= a[n]= If[n<3, 1, a[n-1] - HC[n]*a[n-2]];
Table[a[n], {n, 40}]
PROG
(Sage)
@cached_function
def HC(n): # HC = A004001
if (n<3): return fibonacci(n)
else: return HC(HC(n-1)) +HC(n -HC(n-1))
@CachedFunction
def a(n): # A135688
if (n<3): return 1
else: return a(n-1) - HC(n)*a(n-2)
[a(n) for n in (1..40)] # G. C. Greubel, Nov 25 2021
CROSSREFS
KEYWORD
sign,less
AUTHOR
Roger L. Bagula, Feb 19 2008
STATUS
approved