login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A352407
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.
1
2, 3, 14, 5, 5, 11, 4, 42, 54, 6, 17, 38, 6, 27, 12, 71, 20, 5, 6, 8, 12, 12, 42, 37, 36, 23, 22, 9, 5, 19, 10, 35, 31, 31, 60, 47, 33, 44, 46, 15, 8, 49, 14, 9, 12, 23, 35, 34, 28, 11, 86, 43, 20, 49, 18, 17, 12, 9, 22, 45, 26, 5, 31, 51, 72, 7, 6, 121, 120, 111, 86, 341, 56, 63, 12, 85, 12, 21
OFFSET
0,1
COMMENTS
This sequences uses the same iterative formula as A352406 except that the two previous terms are multiplied instead of added. See that sequence for further details.
In the first 500000 terms the largest value is a(409758) = 1480452. In the same range the smallest number greater than 1 not to have appeared is 16291, although it is likely all numbers eventually appear.
EXAMPLE
a(0) = 2 as starting at 0 and 1 gives 0*1 % 2 = 0, with two terms before reaching zero. This is the smallest possible value and the only term to equal 2.
a(2) = 14 as starting at 2 and 3 gives 2*3 % 4 = 2, 3*2 % 5 = 1, 2*1 % 6 = 2, 1*2 % 7 = 2, 2*2 % 8 = 4, 2*4 % 9 = 8, 4*8 % 10 = 2, 8*2 % 11 = 5, 2*5 % 12 = 10, 5*10 % 13 = 11, 10*11 % 14 = 12, 11*12 % 15 = 12, 12*12 % 16 = 0, with fourteen terms before reaching zero.
a(3) = 5 as starting at 3 and 4 gives 3*4 % 5 = 2, 4*2 % 6 = 2, 2*2 % 7 = 4, 2*4 % 8 = 0, with five terms before reaching zero.
CROSSREFS
Cf. A352406 (addition), A079777.
Sequence in context: A287139 A288770 A249826 * A364037 A321226 A337329
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Mar 15 2022
STATUS
approved