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!)
A102149 If mod(n,3)=0 then a(n) = a(n-1), if mod(n,3)=1 then a(n) = Q(n-2)+Q(n-3), if mod(,n,3)=2 then a(n-3)+a(n-4)+a(n-5), where Q() = A005185(). 0

%I #5 Mar 12 2014 16:36:44

%S 1,1,2,3,5,4,4,7,12,12,11,23,23,14,46,46,18,83,83,21,147,147,24,251,

%T 251,28,422,422,30,701,701,32,1153,1153,34,1886,1886,40,3073,3073,43,

%U 4999,4999,46,8115,8115,48,13160,13160,56,21323,21323,55,34539,34539,56

%N If mod(n,3)=0 then a(n) = a(n-1), if mod(n,3)=1 then a(n) = Q(n-2)+Q(n-3), if mod(,n,3)=2 then a(n-3)+a(n-4)+a(n-5), where Q() = A005185().

%t Hofstadter[n_Integer? Positive] := Hofstadter[n] = Hofstadter[n - Hofstadter[n - 1]] + Hofstadter[n - Hofstadter[n - 2]] Hofstadter[0] = Hofstadter[1] = 1; Hofstadter[2] = 2; Hofstadter[3] = 3; Hofstadter[4] = 3 a[n_Integer?Positive] := If[Mod[n, 3] == 0, a[n] = a[n - 1], If[Mod[n, 3] == 1, a[n] = Hofstadter[n - 2] + Hofstadter[n - 3], a[n] = a[n - 3] + a[n - 4] + a[n - 5]]] a[0] = 1; a[1] = 1; a[2] = 2; a[3] = 3; a[4] = 5; aa = Table[a[n], {n, 0, 200}]

%Y Cf. A005185.

%K nonn

%O 0,3

%A _Roger L. Bagula_, Mar 15 2005

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 06:49 EDT 2024. Contains 371964 sequences. (Running on oeis4.)