login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A060730 a(n) = a(n-1) + a(n - 1 minus the number of terms of a(k) == (mod 3) so far). 0

%I

%S 1,2,3,5,7,12,17,22,34,41,53,87,109,131,184,218,252,361,414,501,632,

%T 763,894,1112,1330,1548,1909,2161,2575,3207,3568,4331,5225,5726,6489,

%U 7819,8582,9694,11855,12967,14515,18083,19413,21574,26799,28708,32276

%N a(n) = a(n-1) + a(n - 1 minus the number of terms of a(k) == (mod 3) so far).

%e a(5) = a(4) + a(4 - the number of terms congruent to 2 (mod 3) so far) = a(4) + a(4-2) = 5 + 2 = 7.

%t m[ 1 ] = 1; m[ 2 ] = 2; m[ 3 ] = 3; m[ n_Integer ] := m[ n ] = Block[ {a = b = c = 0}, Do[ Switch[ Mod[ m[ k ], 3 ], 0, a++, 1, b++, 2, c++ ], {k, 1, n - 1} ]; Switch[ Mod[ n, 3 ], 0, m[ n - 1 ] + m[ n - 1 - a ], 1, m[ n - 1 ] + m[ n - 1 - b ], 2, m[ n - 1 ] + m[ n - 1 - c ] ] ]; Table[ m[ n ], {n, 1, 50} ]

%K nonn

%O 1,2

%A _Robert G. Wilson v_, Apr 22 2001

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 13 03:41 EST 2019. Contains 329968 sequences. (Running on oeis4.)