OFFSET
1,3
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
Emmanuel Preissmann, A Self-Indexed Sequence, Journal of Integer Sequences, Vol. 8 (2005), Article 05.3.5.
EXAMPLE
a(5) = a(4)+a(4)+a(3) = 5+5+2 = 12.
MATHEMATICA
a[1] = 1; a[n_ /; n <= 0] = 0; a[n_] := a[n] = Sum[a[n - a[k]], {k, 1, n-1}]; Table[a[n], {n, 1, 32}] (* Jean-François Alcover, Oct 07 2013 *)
PROG
(Haskell)
a052109 n = a052109_list !! (n-1)
a052109_list = 1 : f 2 [1] where
f n xs = z : f (n+1) (z:xs) where
z = sum $ map (a052109 . fromInteger) $
dropWhile (<= 0) $ map (n -) xs
-- Reinhard Zumkeller, Dec 02 2011
CROSSREFS
KEYWORD
easy,nonn,nice
AUTHOR
Robert Lozyniak (11(AT)onna.com), Jan 20 2000
EXTENSIONS
More terms from David W. Wilson, Feb 01 2000
STATUS
approved