A352406 The number of terms before reaching zero when starting at n and iterating: f(n) = n, f(n+1) = n+1; f(n+k) = (f(n+k-2) + f(n+k-1)) (mod (n+k)), where k>=2.
5, 2, 7, 3, 8, 14, 5, 7, 4, 12, 46, 34, 18, 21, 21, 16, 5, 10, 8, 25, 128, 237, 79, 25, 266, 25, 10, 74, 34, 27, 6, 11, 22, 23, 72, 75, 26, 267, 16, 893, 28, 40, 8, 113, 27, 16, 163, 41, 13, 27, 169, 48, 837, 7, 88, 436, 23, 144, 59, 36, 77, 71, 466, 96, 14, 226, 371, 72, 231, 463, 377, 29
Offset: 0
Keywords
Examples
a(0) = 5 as starting at 0 and 1 gives 0+1 % 2 = 1, 1+1 % 3 = 2, 1+2 % 4 = 3, 2+3 % 5 = 0, with five terms before reaching zero. See A079777. a(1) = 2 as starting at 1 and 2 gives 1+2 % 3 = 0, with two terms before reaching zero. This is the smallest possible value and the only term to equal 2. a(2) = 7 as starting at 2 and 3 gives 2+3 % 4 = 1, 3+1 % 5 = 4, 1+4 % 6 = 5, 4+5 % 7 = 2, 5+2 % 8 = 7, 2+7 % 9 = 0, with seven terms before reaching zero.
Links
- Scott R. Shannon, Line graph of the first 50000 terms.
Comments