login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A052109 a(1)=1, a(n)=a(n-a(1))+a(n-a(2))+a(n-a(3))+....a(n-a(n-1)) for n>1, with convention that a(i)=0 for i<=0. 2

%I #20 May 24 2015 03:47:19

%S 1,1,2,5,12,30,73,178,434,1058,2580,6291,15341,37408,91217,222427,

%T 542374,1322546,3224947,7863835,19175478,46758223,114017050,278023561,

%U 677943348,1653123143,4031039074,9829440768,23968486545,58445679752,142516194140,347516970942

%N a(1)=1, a(n)=a(n-a(1))+a(n-a(2))+a(n-a(3))+....a(n-a(n-1)) for n>1, with convention that a(i)=0 for i<=0.

%H Reinhard Zumkeller, <a href="/A052109/b052109.txt">Table of n, a(n) for n = 1..1000</a>

%H Emmanuel Preissmann, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL8/Preissmann/preissmann8.html">A Self-Indexed Sequence</a>, Journal of Integer Sequences, Vol. 8 (2005), Article 05.3.5.

%e a(5) = a(4)+a(4)+a(3) = 5+5+2 = 12.

%t 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 *)

%o (Haskell)

%o a052109 n = a052109_list !! (n-1)

%o a052109_list = 1 : f 2 [1] where

%o f n xs = z : f (n+1) (z:xs) where

%o z = sum $ map (a052109 . fromInteger) $

%o dropWhile (<= 0) $ map (n -) xs

%o -- _Reinhard Zumkeller_, Dec 02 2011

%Y Cf. A004001.

%K easy,nonn,nice

%O 1,3

%A Robert Lozyniak (11(AT)onna.com), Jan 20 2000

%E More terms from _David W. Wilson_, Feb 01 2000

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 11:39 EDT 2024. Contains 371969 sequences. (Running on oeis4.)