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.

A334874 a(n) = sigma(1) - tau(2) + sigma(3) - tau(4) + sigma(5) - tau(6) + ... - (up to n).

This page as a plain text file.
%I A334874 #16 May 15 2020 12:04:59
%S A334874 1,-1,3,0,6,2,10,6,19,15,27,21,35,31,55,50,68,62,82,76,108,104,128,
%T A334874 120,151,147,187,181,211,203,235,229,277,273,321,312,350,346,402,394,
%U A334874 436,428,472,466,544,540,588,578,635,629,701,695,749,741,813,805,885,881,941,929
%N A334874 a(n) = sigma(1) - tau(2) + sigma(3) - tau(4) + sigma(5) - tau(6) + ... - (up to n).
%H A334874 Robert Israel, <a href="/A334874/b334874.txt">Table of n, a(n) for n = 1..10000</a>
%F A334874 a(n) = Sum_{k=1..n} (-1)^(k+1) * sigma_[k mod 2](k), where sigma_[0](n) = tau(n), the number of divisors of n and sigma_[1](n) = sigma(n), the sum of the divisors of n.
%F A334874 a(p^k) - a(p^k-1) = (p^(k+1)-1)/(p-1), where p is an odd prime and k is a positive integer. - _Wesley Ivan Hurt_, May 15 2020
%e A334874 a(1) = sigma(1) = 1;
%e A334874 a(2) = sigma(1) - tau(2) = 1 - 2 = -1;
%e A334874 a(3) = sigma(1) - tau(2) + sigma(3) = 1 - 2 + 4 = 3;
%e A334874 a(4) = sigma(1) - tau(2) + sigma(3) - tau(4) = 1 - 2 + 4 - 3 = 0;
%p A334874 f:= proc(n) if n::odd then numtheory:-sigma(n) else -numtheory:-tau(n) fi end proc:
%p A334874 ListTools:-PartialSums(map(f,[$1..100])); # _Robert Israel_, May 15 2020
%t A334874 Table[Sum[(-1)^(k + 1)*DivisorSigma[Mod[k, 2], k], {k, n}], {n, 100}]
%o A334874 (PARI) a(n) = sum(k=1, n, (-1)^(k+1)*sigma(k, k % 2)); \\ _Michel Marcus_, May 14 2020
%Y A334874 Cf. A000005 (tau), A000203 (sigma), A245466.
%K A334874 sign
%O A334874 1,3
%A A334874 _Wesley Ivan Hurt_, May 13 2020