OFFSET
0,2
COMMENTS
a(p-2) = p for odd primes p.
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..124340
FORMULA
Other identities and observations. For all n >= 0:
a(n) <= A262686(n).
MAPLE
N:= 1000: # to get a(0) .. a(N)
V:= Array(0..N):
for k from 1 to 2*(N+1) do
v:= k - numtheory:-tau(k);
if v <= N and V[v] = 0 then V[v]:= k fi
od:
seq(V[n], n=0..N); # Robert Israel, Dec 21 2015
MATHEMATICA
Table[k = 1; While[k - DivisorSigma[0, k] != n && k <= 2 (n + 1), k++]; If[k > 2 (n + 1), 0, k], {n, 0, 80}]] (* Michael De Vlieger, Dec 22 2015 *)
PROG
(PARI)
allocatemem(123456789);
uplim2 = 2162160;
v082284 = vector(uplim1);
A082284 = n -> if(!n, 1, v082284[n]);
for(n=1, uplim1, k = n-numdiv(n); if((0 == A082284(k)), v082284[k] = n));
for(n=0, 124340, write("b082284.txt", n, " ", A082284(n)));
\\ Antti Karttunen, Dec 21 2015
(Scheme)
(define (A082284 n) (if (zero? n) 1 (let ((u (+ n (A002183 (+ 2 (A261100 n)))))) (let loop ((k n)) (cond ((= (A049820 k) n) k) ((> k u) 0) (else (loop (+ 1 k))))))))
;; Antti Karttunen, Dec 21 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Apr 14 2003
EXTENSIONS
More terms from David Wasserman, Aug 31 2004
STATUS
approved