login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A104205
If mod[n,4]=0 then a(n)=a(n-1), if mod[n,4]=1 then a(n)=a(n-2)+a(n-3), if mod[n,4]=2 then a(n)=a(n-3)+a(n-4)+a(n-5), if mod[n,4]=2 then a(n)=a(n-4)+a(n-5)+a(n-6)+a[n-7].
0
0, 1, 1, 2, 3, 5, 8, 4, 4, 12, 17, 20, 20, 37, 49, 53, 53, 102, 139, 159, 159, 298, 400, 453, 453, 853, 1151, 1310, 1310, 2461, 3314, 3767, 3767, 7081, 9542, 10852, 10852, 20394, 27475, 31242, 31242, 58717, 79111, 89963, 89963, 169074, 227791, 259033, 259033
OFFSET
0,4
MATHEMATICA
a[n_Integer?Positive] := If[Mod[n, 4] == 0, a[n] = a[n - 1], If[Mod[n, 4] == 1, a[n] = a[n - 2] + a[n - 3], If[Mod[n, 4] == 1, a[n] = a[n - 3] + a[n - 4] + a[ n - 5], a[n] = a[n - 4] + a[n - 5] + a[n - 6] + a[n - 7]]]] a[0] = 0; a[1] = 1; a[2] = 1; a[3] = 2; a[4] = 3; a[5] = 5; a[6] = 8 aa = Table[a[n], {n, 0, 200}]
CROSSREFS
Sequence in context: A105472 A030132 A004090 * A267758 A333301 A166015
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Mar 13 2005
STATUS
approved