|
|
A360559
|
|
Alternating partial sum of A006530.
|
|
0
|
|
|
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, 58, 61, 54, 83, 78, 109, 107, 118, 101, 108, 105, 142, 123, 136, 131, 172, 165, 208, 197, 202, 179, 226, 223, 230, 225, 242, 229, 282, 279, 290, 283, 302, 273, 332, 327, 388, 357, 364, 362
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
a(2) = -1 is the only negative term of the sequence.
|
|
LINKS
|
|
|
FORMULA
|
a(n) ~ (Pi^2*n^2*log(n/4))/(24*log(n/2)*log(n)) as n -> infinity.
|
|
EXAMPLE
|
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.
|
|
MATHEMATICA
|
a[k_] := Sum[(-1)^(n + 1)*ResourceFunction["LargestPrimeFactor"][n], {n, 1, k}].
|
|
PROG
|
(PARI) a(n)=if(n>1, vecmax(factor(n)[, 1]), 1); s(k)=sum(n=1, k, a(n)*(-1)^(n+1))
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|