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!)
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. 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
The first term corresponds to the number of terms before zero in A079777. This sequence starts at n and counts the number of terms before zero using the same iterative formula.
The sequence shows large variations in its value, e.g., a(496) = 222, a(497) = 1087851. In the first 50000 terms the largest value is a(21897) = 1248976431. In the same range the smallest number greater than 1 not to have appeared is 414, although it is likely all numbers eventually appear.
LINKS
EXAMPLE
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.
CROSSREFS
Cf. A079777, A352407 (multiplication).
Sequence in context: A115321 A127108 A196405 * A093606 A064677 A088520
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Mar 15 2022
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 May 1 14:05 EDT 2024. Contains 372174 sequences. (Running on oeis4.)