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
Antti Karttunen, Table of n, a(n) for n = 0..110880
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:
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
KEYWORD
nonn
AUTHOR
Labos Elemer, May 11 2001
EXTENSIONS
Offset corrected by Jaroslav Krizek, Feb 09 2014
STATUS
approved