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 A254618 #19 Mar 28 2015 14:48:24 %S A254618 1,2,2,3,2,2,3,4,4,2,2,5,5,6,2,2,3,6,2,1,7,3,2,2,3,6,1,3,2,7,3,2,2,1, %T A254618 7,8,2,4,3,4,9,2,3,3,4,2,2,2,3,4,3,2,5,4,2,2,1,5,5,3,2,1,2,2,3,9,7,2, %U A254618 4,6,4,4,2,2,3,4,2,2,8,1,2,2,2,3,2,3,5 %N A254618 a(n) = k-tuple deficiency of n-th deficient number. %C A254618 For any deficient number x iterate the process f(x)=sigma(x)-x. Sequence lists how many times f(x) keeps deficient until it reaches zero. %C A254618 Non-deficient numbers are excluded from this sequence. %C A254618 k-tuple deficiency records is A000027. %C A254618 k-tuple deficiency record-holders is A234899. %H A254618 Paolo P. Lava, <a href="/A254618/b254618.txt">Table of n, a(n) for n = 1..1000</a> %e A254618 a(20) = 1 because the 20th deficient number is 25 and: %e A254618 1) f(25) = sigma(25) - 25 = 6 < 25. %e A254618 We must stop here because 6 is abundant. %e A254618 a(21) = 7 because the 21st deficient number is 26 and: %e A254618 1) f(26) = sigma(26) - 26 = 16 < 26; %e A254618 2) f(16) = sigma(16) - 16 = 15 < 16; %e A254618 3) f(15) = sigma(15) - 15 = 9 < 15; %e A254618 4) f(9) = sigma(9) - 9 = 4 < 9; %e A254618 5) f(4) = sigma(4) - 4 = 3 < 4; %e A254618 6) f(3) = sigma(3) - 3 = 2 < 1; %e A254618 7) f(1) = sigma(1) - 1 = 0 < 1. %e A254618 We must stop here because sigma(0) is not defined. %p A254618 with(numtheory): P:=proc(q) local a,b,n,t; %p A254618 for n from 1 to q do t:=0; b:=sigma(n)-n; a:=n; %p A254618 if b<a then while b<a do t:=t+1; a:=b; b:=sigma(b)-b; od; %p A254618 print(t); fi; od; end: P(10^3); %Y A254618 Cf. A000027, A005100, A081705, A098007, A098008, A234899. %K A254618 nonn %O A254618 1,2 %A A254618 _Paolo P. Lava_, Feb 03 2015