OFFSET
0,5
COMMENTS
The sequence is defined only for n <= 866, see example. - Reinhard Zumkeller, Jul 21 2012
LINKS
Reinhard Zumkeller, full Table of n, a(n) for n = 0..866
EXAMPLE
Last term: a(866) = a(|866 - a(866-3)|) + a(|866 - a(866-4)|) = a(|866 - a(863)|) + a(|866 - a(862)|) = a(|866 - 718|) + a(|866 - 88|) = a(148) + a(778) = 28 + 655 = 683,
but a(867) = a(|867 - a(867-3)|) + a(|867 - a(867-4)|) = a(|867 - a(864)|) + a(|867 - a(863)|) = a(|867 - 2546|) + a(|867 - 718|) = a(1679) + a(149) = undefined + 112 = undefined.
PROG
(Haskell)
a064657 n = a064657_list !! n
a064657_list = map fromJust $ takeWhile (/= Nothing) zs where
z n = fromJust $ zs !! n
zs = (map Just [1, 1, 1, 1]) ++ f 4 where
f x = y : f (x + 1) where
y | 2*x < max i3 i4 = Nothing
| otherwise = Just $ z (abs (x - i3)) + z (abs (x - i4))
where i3 = z (x - 3); i4 = z (x - 4)
b064657 = bFile' "A064657" a064657_list 0 -- (0.03 secs, 3184228 bytes)
-- Reinhard Zumkeller, Jul 21 2012
CROSSREFS
KEYWORD
nonn,fini,full
AUTHOR
Roger L. Bagula, Oct 08 2001
EXTENSIONS
More terms from Vladeta Jovovic, Oct 09, 2001
Keyword fini added by Reinhard Zumkeller, Jul 21 2012
STATUS
approved