OFFSET
1,3
COMMENTS
Dies if a(n) > n. Is the sequence defined for all positive n?
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..100000
EXAMPLE
a(27) = 19 because a(26) = 17, a(25) = 16, a(16) = 10, and then a(27-17) + a(27-10) = a(10) + a(17) = 7 + 12 = 19.
MATHEMATICA
a249569[n_Integer] := Module[{k, t = Table[0, {n}]}, t[[1]] = t[[2]] = 1; Do[t[[k]] = t[[k - t[[k - 1]]]] + t[[k - t[[t[[k - 2]]]]]], {k, 3, n}]; t]; a249569[69] (* Michael De Vlieger, Nov 12 2014 *)
PROG
(Magma) I:=[1, 1]; [n le 2 select I[n] else Self(n-Self(n-1))+Self(n-Self(Self(n-2))): n in [1..69]];
(Haskell)
a249569 n = a249569_list !! (n-1)
a249569_list = 1 : 1 : zipWith (+)
(map a249569 $ zipWith (-) [3..] $ tail a249569_list)
(map a249569 $ zipWith (-) [3..] $ map a249569 a249569_list)
-- Reinhard Zumkeller, Nov 14 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Arkadiusz Wesolowski, Nov 10 2014
STATUS
approved