login
A262686
a(n) = largest number k such that k - d(k) = n, or 0 if no such number exists, where d(n) = the number of divisors of n (A000005).
20
2, 4, 6, 5, 8, 7, 12, 0, 0, 11, 14, 16, 18, 0, 20, 17, 24, 21, 22, 0, 0, 23, 30, 27, 0, 0, 32, 36, 0, 33, 34, 35, 40, 0, 42, 39, 0, 0, 48, 45, 0, 43, 46, 0, 50, 47, 54, 51, 60, 0, 0, 55, 0, 57, 58, 0, 0, 64, 66, 61, 72, 65, 70, 0, 0, 69, 0, 0, 0, 75, 80, 73, 84, 77, 0, 0, 81, 79, 90, 0, 88, 85, 86, 87, 96, 0, 92, 91, 0, 93, 94, 100, 98, 99, 102, 97, 108, 105, 0, 101
OFFSET
0,1
LINKS
MATHEMATICA
Table[k = 2 n + 3; While[Nor[k - DivisorSigma[0, k] == n, k == 0], k--]; k, {n, 0, 99}] (* Michael De Vlieger, Sep 29 2015 *)
PROG
(Scheme)
(definec (A262686 n) (if (zero? n) 2 (let ((u (+ n (A002183 (+ 2 (A261100 n)))))) (let loop ((k u)) (cond ((= (A049820 k) n) k) ((< k n) 0) (else (loop (- k 1))))))))
CROSSREFS
Cf. also A082284 (the smallest such number), A262511 (positions where these are equal and nonzero).
Sequence in context: A177961 A353733 A297615 * A371909 A354717 A179225
KEYWORD
nonn
AUTHOR
Antti Karttunen, Sep 28 2015
STATUS
approved