login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A182394
Signs of differences of number of divisors function: a(n) = sign(d(n)-d(n-1)), cf. A000005.
4
1, 0, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 0, 1, -1, 1, -1, 1, -1, 0, -1, 1, -1, 1, 0, 1, -1, 1, -1, 1, -1, 0, 0, 1, -1, 1, 0, 1, -1, 1, -1, 1, 0, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 0, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 0, -1, 1
OFFSET
2
COMMENTS
d(n) (A000005) has offset 1, being an arithmetic function, so this sequence has offset 2.
Erdős proves that a(n) = 1 with natural density 1/2 and a(n) = -1 with natural density 1/2. Heath-Brown proved that a(n) = 0 infinitely often; see A005237 for details. - Charles R Greathouse IV, Oct 20 2013
LINKS
P. Erdős, On a problem of Chowla and some related problems, Proc. Cambridge Philos. Soc. 32 (1936), pp. 530-540.
D. R. Heath-Brown, The divisor function at consecutive integers, Mathematika 31 (1984), pp. 141-149.
FORMULA
a(n) = 1 if d(n) > d(n - 1) and a(n) = -1 if d(n) < d(n - 1), otherwise a(n) = 0 if d(n) = d(n - 1), where d(n) is the number of divisors of n (A000005).
EXAMPLE
The initial values d(1) ... d(20) are
1, 2, 2, 3, 2, 4, 2, 4, 3, 4, 2, 6, 2, 4, 4, 5, 2, 6, 2, 6, ...
and the first differences are
1, 0, 1, -1, 2, -2, 2, -1, 1, -2, 4, -4, 2, 0, 1, -3, 4, -4, 4, ...,
the signs of which are +1, 0, +1, -1, ...
MATHEMATICA
Sign[Differences[DivisorSigma[0, Range[2..100]]]] (* T. D. Noe, Apr 27 2012, amended by N. J. A. Sloane, Oct 05 2017 *)
PROG
(PARI) a(n)=sign(numdiv(n)-numdiv(n-1)) \\ Charles R Greathouse IV, Oct 20 2013
CROSSREFS
Cf. A000005, A051950, A175150 (accumulated sums).
Sequence in context: A128973 A176412 A013596 * A079054 A131695 A324113
KEYWORD
sign,easy
AUTHOR
Giovanni Teofilatto, Apr 27 2012
EXTENSIONS
Edited by N. J. A. Sloane, Oct 05 2017
STATUS
approved