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!)
A147968 Long "if ladder" modulo 8 recursion: ( using f[n] for f(n)) f[n] = f[f[n - 1]] + If[n < 8, f[n - f[( n - 1)]], If[Mod[n, 8] == 0, f[f[n/8]], If[Mod[1 + n, 8] == 1, f[f[(n - 1)/8]], If[Mod[2 + n, 8] == 2, f[f[(n - 2)/8]], If[Mod[3 + n, 8] == 3, f[f[(n - 3)/8]], If[ Mod[4 + n, 8] == 4, f[f[(n - 4)/8]], If[Mod[5 + n, 8] == 5, f[f[(n - 5)/8]], If[ Mod[6 + n, 8] == 6, f[f[(n - 6)/8]], If[Mod[7 + n, 8] == 7, f[f[(n - 7)/8]], f[n - f[(n - 1)]]]]]]]]]]] 0
0, 1, 1, 2, 2, 3, 4, 4, 3, 6, 6, 7, 7, 8, 7, 7, 5, 10, 9, 12, 10, 13, 14, 13, 9, 11, 14, 15, 15, 14, 12, 19, 13, 18, 14, 20, 15, 21, 23, 18, 11, 19, 25, 20, 19, 26, 24, 22, 16, 23, 28, 28, 24, 23, 32, 26, 16, 24, 23, 28, 28, 33, 32, 32, 15, 35, 39, 33, 38, 42, 40, 30, 16, 29, 40, 31 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
The polynomial ratio is near 1.2079333633029512. I got about four of these by switching f[n-1] and f[n-2] and f[n-f[n-1]] and f[n-f[n-2]]: this is the one with the lowest dip in the curve.
LINKS
FORMULA
( using f[n] for f(n)) f[n] = f[f[n - 1]] + If[n < 8, f[n - f[( n - 1)]], If[Mod[n, 8] == 0, f[f[n/8]], If[Mod[1 + n, 8] == 1, f[f[(n - 1)/8]], If[Mod[2 + n, 8] == 2, f[f[(n - 2)/8]], If[Mod[3 + n, 8] == 3, f[f[(n - 3)/8]], If[ Mod[4 + n, 8] == 4, f[f[(n - 4)/8]], If[Mod[5 + n, 8] == 5, f[f[(n - 5)/8]], If[ Mod[6 + n, 8] == 6, f[f[(n - 6)/8]], If[Mod[7 + n, 8] == 7, f[f[(n - 7)/8]], f[n - f[(n - 1)]]]]]]]]]]]
MATHEMATICA
f[0] = 0; f[1] = 1; f[2] = 1; f[n_] := f[n] = f[f[n - 1]] + If[n < 8, f[n - f[(n - 1)]], If[ Mod[n, 8] == 0, f[f[n/8]], If[Mod[1 + n, 8] == 1, f[f[(n - 1)/8]], If[Mod[2 + n, 8] == 2, f[f[(n - 2)/8]], If[Mod[3 + n, 8] == 3, f[f[(n - 3)/8]], If[Mod[4 + n, 8] == 4, f[f[(n - 4)/8]], If[ Mod[5 + n, 8] == 5, f[f[(n - 5)/8]], If[Mod[6 + n, 8] == 6, f[f[(n - 6)/8]], If[ Mod[7 + n, 8] == 7, f[f[(n - 7)/8]], f[n - f[(n - 1)]]]]]]]]]]] Table[f[n], {n, 0, 100}]
CROSSREFS
Sequence in context: A285333 A086416 A168148 * A366320 A065167 A332298
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Nov 17 2008
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 March 29 07:27 EDT 2024. Contains 371265 sequences. (Running on oeis4.)