login
A284570
a(n) = A000005((n+1)^2) - A000005(n^2).
2
2, 0, 2, -2, 6, -6, 4, -2, 4, -6, 12, -12, 6, 0, 0, -6, 12, -12, 12, -6, 0, -6, 18, -16, 4, -2, 8, -12, 24, -24, 8, -2, 0, 0, 16, -22, 6, 0, 12, -18, 24, -24, 12, 0, -6, -6, 24, -22, 10, -6, 6, -12, 18, -12, 12, -12, 0, -6, 42, -42, 6, 6, -2, -4, 18, -24, 12, -6, 18, -24, 32, -32, 6, 6, 0, -6, 18, -24, 24, -18, 0, -6, 42, -36, 0, 0, 12, -18, 42, -36, 6, -6
OFFSET
1,1
LINKS
FORMULA
a(n) = A000005((n+1)^2) - A000005(n^2).
a(n) = A048691(n+1) - A048691(n). - Michel Marcus, Apr 15 2017
MATHEMATICA
Table[DivisorSigma[0, (n + 1)^2] - DivisorSigma[0, n^2], {n, 100}] (* Indranil Ghosh, Apr 15 2017 *)
Differences[DivisorSigma[0, Range[100]^2]] (* Harvey P. Dale, Jul 21 2023 *)
PROG
(PARI) A284570(n) = numdiv((n+1)^2)-numdiv(n^2);
(Scheme) (define (A284570 n) (- (A000005 (A000290 (+ 1 n))) (A000005 (* n n))))
(Python)
from sympy import divisor_count as D
print([D((n + 1)**2) - D(n**2) for n in range(1, 101)]) # Indranil Ghosh, Apr 15 2017
CROSSREFS
Cf. A000005, A000290, A048691, A276553 (positions of zeros).
Sequence in context: A078052 A056458 A322509 * A256847 A372023 A046277
KEYWORD
sign
AUTHOR
Antti Karttunen, Apr 15 2017
STATUS
approved