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!)
A060732 a(n) = a(n-1) + a(n - 1 minus the number of terms of a(k) == (mod 5) so far). 0

%I #2 Mar 30 2012 17:30:31

%S 1,2,3,4,5,9,14,23,28,51,74,125,153,181,306,380,686,839,992,1372,1678,

%T 2517,3203,4042,5720,7092,8464,10142,12659,18379,24099,28141,35233,

%U 39275,51934,64593,77252,89911,100053,139328,174561,209794,237935

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

%t m[ 1 ] = 1; m[ 2 ] = 2; m[ 3 ] = 3; a[ 4 ] = 4; m[ 5 ] = 5; m[ n_Integer ] := m[ n ] = Block[ {a = b = c = d = 0}, Do[ Switch[ Mod[ m[ k ], 5 ], 0, a++, 1, b++, 2, c++, 3, d++, 4, e++ ], {k, 1, n - 1} ]; Switch[ Mod[ n, 5 ], 0, m[ n - 1 ] + m[ n - 1 - a ], 1, m[ n - 1 ] + m[ n - 1 - b ], 2, m[ n - 1 ] + m[ n - 1 - c ], 3, m[ n - 1 ] + m[ n - 1 - d ], 4, m[ n - 1 ] + m[ n - 1 - e ] ] ]; 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 17 21:22 EDT 2024. Contains 371767 sequences. (Running on oeis4.)