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.

A360559 Alternating partial sum of A006530.

This page as a plain text file.
%I A360559 #19 Aug 09 2025 04:00:44
%S A360559 1,-1,2,0,5,2,9,7,10,5,16,13,26,19,24,22,39,36,55,50,57,46,69,66,71,
%T A360559 58,61,54,83,78,109,107,118,101,108,105,142,123,136,131,172,165,208,
%U A360559 197,202,179,226,223,230,225,242,229,282,279,290,283,302,273,332,327,388,357,364,362
%N A360559 Alternating partial sum of A006530.
%C A360559 a(2) = -1 is the only negative term of the sequence.
%H A360559 Vaclav Kotesovec, <a href="/A360559/b360559.txt">Table of n, a(n) for n = 1..10000</a>
%F A360559 a(n) ~ (Pi^2*n^2*log(n/4))/(24*log(n/2)*log(n)) as n -> infinity.
%e A360559 a(4) = 0 since the greatest prime factors of {1,2,3,4} are {1,2,3,2} and the alternating sum 1-2+3-2 = 0.
%t A360559 a[k_] := Sum[(-1)^(n + 1)*ResourceFunction["LargestPrimeFactor"][n], {n, 1, k}]; Table[a[n], {n, 1, 64}]
%t A360559 (* or *)
%t A360559 Accumulate[Table[(-1)^(n + 1)*FactorInteger[n][[-1, 1]], {n, 1, 100}]] (* _Vaclav Kotesovec_, Aug 09 2025 *)
%o A360559 (PARI) a(n)=if(n>1, vecmax(factor(n)[, 1]), 1); s(k)=sum(n=1, k, a(n)*(-1)^(n+1))
%Y A360559 Cf. A006530, A046670.
%K A360559 sign
%O A360559 1,3
%A A360559 _Luca Onnis_, Feb 11 2023