This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A082284 #28 Jun 03 2025 05:04:29 %S A082284 1,3,6,5,8,7,9,0,0,11,14,13,18,0,20,17,24,19,22,0,0,23,25,27,0,0,32, %T A082284 29,0,31,34,35,40,0,38,37,0,0,44,41,0,43,46,0,50,47,49,51,56,0,0,53,0, %U A082284 57,58,0,0,59,62,61,72,65,68,0,0,67,0,0,0,71,74,73,84,77,0,0,81,79,82,0,88 %N A082284 a(n) = smallest number k such that k - tau(k) = n, or 0 if no such number exists, where tau(n) = the number of divisors of n (A000005). %C A082284 a(p-2) = p for odd primes p. %H A082284 Antti Karttunen, <a href="/A082284/b082284.txt">Table of n, a(n) for n = 0..124340</a> %F A082284 Other identities and observations. For all n >= 0: %F A082284 a(n) <= A262686(n). %p A082284 N:= 1000: # to get a(0) .. a(N) %p A082284 V:= Array(0..N): %p A082284 for k from 1 to 2*(N+1) do %p A082284 v:= k - numtheory:-tau(k); %p A082284 if v <= N and V[v] = 0 then V[v]:= k fi %p A082284 od: %p A082284 seq(V[n],n=0..N); # _Robert Israel_, Dec 21 2015 %t A082284 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 *) %o A082284 (PARI) %o A082284 allocatemem(123456789); %o A082284 uplim1 = 2162160 + 320; \\ = A002182(41) + A002183(41). %o A082284 uplim2 = 2162160; %o A082284 v082284 = vector(uplim1); %o A082284 A082284 = n -> if(!n,1,v082284[n]); %o A082284 for(n=1, uplim1, k = n-numdiv(n); if((0 == A082284(k)), v082284[k] = n)); %o A082284 for(n=0, 124340, write("b082284.txt", n, " ", A082284(n))); %o A082284 \\ _Antti Karttunen_, Dec 21 2015 %o A082284 (Scheme) %o A082284 (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)))))))) %o A082284 ;; _Antti Karttunen_, Dec 21 2015 %Y A082284 Column 1 of A265751. %Y A082284 Cf. A000005, A002182, A002183, A049820, A060990, A261100. %Y A082284 Cf. A262686 (the largest such number), A262511 (positions where these are equal and nonzero). %Y A082284 Cf. A266114 (same sequence sorted into ascending order, with zeros removed). %Y A082284 Cf. A266115 (positive numbers missing from this sequence). %Y A082284 Cf. A266110 (number of iterations before zero is reached), A266116 (final nonzero value reached). %Y A082284 Cf. also tree A263267 and its illustration. %K A082284 nonn %O A082284 0,2 %A A082284 _Amarnath Murthy_, Apr 14 2003 %E A082284 More terms from _David Wasserman_, Aug 31 2004