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
1, 1, 2, 3, 5, 4, 4, 7, 12, 12, 11, 23, 23, 14, 46, 46, 18, 83, 83, 21, 147, 147, 24, 251, 251, 28, 422, 422, 30, 701, 701, 32, 1153, 1153, 34, 1886, 1886, 40, 3073, 3073, 43, 4999, 4999, 46, 8115, 8115, 48, 13160, 13160, 56, 21323, 21323, 55, 34539, 34539, 56 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
MATHEMATICA
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}]
CROSSREFS
Cf. A005185.
Sequence in context: A214674 A185332 A023818 * A321782 A104204 A131296
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Mar 15 2005
STATUS
approved

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 10:22 EDT 2024. Contains 371967 sequences. (Running on oeis4.)