A060990 Number of solutions to x - d(x) = n, where d(n) is the number of divisors of n (A000005).
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
Keywords
Examples
a(11) = 3 because three numbers satisfy equation x-d(x)=11, namely {13,15,16} with {2,4,5} divisors respectively.
Links
- Antti Karttunen, Table of n, a(n) for n = 0..110880
Crossrefs
Programs
-
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 *)
-
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
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:
Extensions
Offset corrected by Jaroslav Krizek, Feb 09 2014
Comments