OFFSET
1,1
COMMENTS
Consider A330252(n) where we add an additional rule that a(n) = n if a(n-1) = 0. This allows this sequence to extend beyond a(3292) = 0 as now a(3293) = 3293, and the same multiplication or division rules based on the primality of n can continue.
This sequence lists all the values of n where such a sequence equals zero. Examining the gap between these zero values for n up to 10^7 shows the first run of nonzero terms, which starts at n = 1 and goes for 3291 more terms, is the longest such run of nonzero terms. See A330252. This is likely the longest such run for all n, although this is unknown. The next longest nonzero run up to n = 10^7 is 1226 which starts at n = 5690460.
Examining the average length of these nonzero runs for 10^4 to 10^5 terms starting at larger n values of 10^9, 10^12, 10^15 shows the average length is around 40. It is unknown if this approaches a constant as n goes to infinity or if it is dependent on the magnitude of n itself.
For n up to 10^7 there are 220026 runs of nonzero terms. The largest sequence value in this range is a 104-digit number reached at n = 1219963.
EXAMPLE
a(3292) = 0. See A330252.
MATHEMATICA
f[1] = 1; f[n_] := f[n] = If[f[n - 1] == 0, n, If[PrimeQ[n], n*f[n - 1], Floor[f[n - 1]/FactorInteger[n][[1, 1]]]]]; seq = {}; Do[If[f[n] == 0, AppendTo[seq, n]], {n, 1, 10^4}]; seq (* Amiram Eldar, Dec 07 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Dec 07 2019
STATUS
approved