login
A060990
Number of solutions to x - d(x) = n, where d(n) is the number of divisors of n (A000005).
39
2, 2, 1, 1, 1, 1, 3, 0, 0, 1, 1, 3, 1, 0, 1, 1, 1, 2, 1, 0, 0, 1, 4, 1, 0, 0, 1, 2, 0, 2, 1, 1, 1, 0, 2, 2, 0, 0, 2, 2, 0, 1, 1, 0, 1, 1, 3, 1, 2, 0, 0, 2, 0, 1, 1, 0, 0, 3, 2, 1, 1, 1, 2, 0, 0, 2, 0, 0, 0, 2, 4, 1, 1, 1, 0, 0, 1, 1, 2, 0, 1, 2, 1, 1, 1, 0, 1, 2, 0, 1, 1, 2, 1, 1, 1, 1, 2, 1, 0, 1, 0, 1, 3, 0, 1, 1
OFFSET
0,1
COMMENTS
If x-d(x) is never equal to n, then n is in A045765 and a(n) = 0.
Number of solutions to A049820(x) = n. - Jaroslav Krizek, Feb 09 2014
LINKS
FORMULA
a(0) = 2; for n >= 1, a(n) = Sum_{k = n .. n+A002183(2+A261100(n))} [A049820(k) = n]. (Here [...] denotes the Iverson bracket, resulting 1 when A049820(k) is n and 0 otherwise.) - Antti Karttunen, Sep 25 2015, corrected Oct 12 2015.
a(n) = Sum_{k = A082284(n) .. A262686(n)} [A049820(k) = n] (when tacitly assuming that A049820(0) = 0.) - Antti Karttunen, Oct 12 2015
Other identities and observations. For all n >= 0:
a(A045765(n)) = 0. a(A236562(n)) > 0. - Jaroslav Krizek, Feb 09 2014
EXAMPLE
a(11) = 3 because three numbers satisfy equation x-d(x)=11, namely {13,15,16} with {2,4,5} divisors respectively.
MATHEMATICA
lim = 105; s = Table[n - DivisorSigma[0, n], {n, 2 lim + 3}]; Length@ Position[s, #] & /@ Range[0, lim] (* Michael De Vlieger, Sep 29 2015, after Wesley Ivan Hurt at A049820 *)
PROG
(PARI)
allocatemem(123456789);
uplim = 2162160; \\ = A002182(41).
v060990 = vector(uplim);
for(n=3, uplim, v060990[n-numdiv(n)]++);
A060990 = n -> if(!n, 2, v060990[n]);
uplim2 = 110880; \\ = A002182(30).
for(n=0, uplim2, write("b060990.txt", n, " ", A060990(n)));
\\ Antti Karttunen, Sep 25 2015
(Scheme)
(define (A060990 n) (if (zero? n) 2 (add (lambda (k) (if (= (A049820 k) n) 1 0)) n (+ n (A002183 (+ 2 (A261100 n)))))))
;; Auxiliary function add implements sum_{i=lowlim..uplim} intfun(i)
(define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (1+ i) (+ res (intfun i)))))))
;; Proof-of-concept code for the given formula, by Antti Karttunen, Sep 25 2015
CROSSREFS
Cf. A045765 (positions of zeros), A236562 (positions of nonzeros), A262511 (positions of ones).
Cf. A263087 (computed for squares).
Sequence in context: A358469 A156072 A215788 * A276309 A165031 A286634
KEYWORD
nonn
AUTHOR
Labos Elemer, May 11 2001
EXTENSIONS
Offset corrected by Jaroslav Krizek, Feb 09 2014
STATUS
approved