OFFSET
1,3
COMMENTS
The first negative value is at a(3888). Within the first 1000000 values are the negative record values a(n) = -4 at n = {3913, 3915, 3927, 3933}. - Thomas Scheuerle, Jan 20 2023
FORMULA
MATHEMATICA
Join[{0}, Accumulate@ Sign@ Differences@ Table[FactorInteger[n][[-1, 1]], {n, 1, 100}]] (* Amiram Eldar, Jan 20 2023, after the MATLAB code *)
PROG
(MATLAB)
function a = A359953(max_n)
a = [0 cumsum(sign(diff([0 arrayfun(@(x)(max(factor(x))), [2:max_n])])))];
end % Thomas Scheuerle, Jan 20 2023
(PARI) lista(nn) = my(va = vector(nn)); va[1] = 0; va[2] = 1; for (n=3, nn, if (vecmax(factor(n)[, 1]) > vecmax(factor(n-1)[, 1]), va[n] = va[n-1] + 1, va[n] = va[n-1] - 1); ); va; \\ Michel Marcus, Jan 31 2023
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Tamas Sandor Nagy, Jan 19 2023
STATUS
approved