cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A359953 a(1) = 0, a(2) = 1. For n >= 3, if the greatest prime dividing n is greater than the greatest prime dividing n-1, then a(n) = a(n-1) + 1. Otherwise a(n) = a(n-1) - 1.

This page as a plain text file.
%I A359953 #26 Mar 14 2023 10:06:10
%S A359953 0,1,2,1,2,1,2,1,2,3,4,3,4,3,2,1,2,1,2,1,2,3,4,3,4,5,4,5,6,5,6,5,6,7,
%T A359953 6,5,6,5,4,3,4,3,4,3,2,3,4,3,4,3,4,3,4,3,4,3,4,5,6,5,6,5,4,3,4,3,4,3,
%U A359953 4,3,4,3,4,3,2,3,2,3,4,3,2,3,4,3
%N A359953 a(1) = 0, a(2) = 1. For n >= 3, if the greatest prime dividing n is greater than the greatest prime dividing n-1, then a(n) = a(n-1) + 1. Otherwise a(n) = a(n-1) - 1.
%C A359953 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
%F A359953 For n >= 2, if A006530(n) > A006530(n-1), then a(n) = a(n-1) + 1; a(n) = a(n-1) - 1 otherwise.
%F A359953 a(n) = (-1)*Sum_{i=1..n-1} (-1)^A087429(i).
%F A359953 a(1 + A070089(n)) = 1 + a(A070089(n)). - _Thomas Scheuerle_, Jan 20 2023
%e A359953 a(5) = a(4) + 1 = 1 + 1 = 2 because A006530(5) = 5 > A006530(4) = 2.
%t A359953 Join[{0}, Accumulate@ Sign@ Differences@ Table[FactorInteger[n][[-1, 1]], {n, 1, 100}]] (* _Amiram Eldar_, Jan 20 2023, after the MATLAB code *)
%o A359953 (MATLAB)
%o A359953 function a = A359953(max_n)
%o A359953     a = [0 cumsum(sign(diff([0 arrayfun(@(x)(max(factor(x))),[2:max_n])])))];
%o A359953 end % _Thomas Scheuerle_, Jan 20 2023
%o A359953 (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
%Y A359953 Cf. A000040, A006530, A070089, A087429.
%K A359953 easy,sign
%O A359953 1,3
%A A359953 _Tamas Sandor Nagy_, Jan 19 2023