login
A144386
A step cyclic recursion: a(n) = If[a(n - 1) - Prime[n] > 0, Abs[a(n - 1) - 2*n], If[a[n - 1] - Prime[n] < 0, Abs[a(n - 1) + 2*n], Fibonacci[n] - a(n - 1)]].
0
0, 1, 5, -3, 5, 15, 3, 17, 33, 15, 35, 13, 37, 63, 35, 65, 33, 67, 31, 69, 109, 67, 111, 65, 113, 63, 115, 61, 117, 59, 119, 181, 117, 183, 115, 185, 113, 187, 111, 189, 109, 191, 107, 193, 701408540, 701408450, 701408358, 701408264, 701408168, 701408070, 701407970
OFFSET
1,3
FORMULA
a(n) = If[a(n - 1) - Prime[n] > 0, Abs[a(n - 1) - 2*n], If[a[n - 1] - Prime[n] < 0, Abs[a(n - 1) + 2*n], Fibonacci[n] - a(n - 1)]].
MATHEMATICA
a[0] = 0; a[1] = 1; a[n_] := a[n] = If[a[n - 1] - Prime[n] > 0, Abs[a[n - 1] - 2*n], If[a[n - 1] - Prime[n] < 0, Abs[a[n - 1] + 2*n], Fibonacci[n] - a[n - 1]]]; Table[a[n], {n, 0, 50}]
CROSSREFS
Sequence in context: A361546 A128008 A265800 * A256787 A265782 A073685
KEYWORD
uned,sign
AUTHOR
Roger L. Bagula, Oct 01 2008
STATUS
approved