Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #16 Feb 06 2019 17:19:10
%S 1,2,1,2,1,3,1,1,1,3,1,2,1,2,1,2,1,3,1,2,1,3,1,1,1,2,1,3,1,3,1,1,1,2,
%T 1,2,1,2,1,2,1,4,1,2,1,3,1,1,1,2,1,3,1,2,1,1,1,3,1,2,1,2,1,1,1,4,1,2,
%U 1,3,1,2,1,2,1,2,1,4,1,1,1,3,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,4,1,1,1
%N Number of values of k such that n = k - largest divisor of k (<k).
%H Antti Karttunen, <a href="/A074093/b074093.txt">Table of n, a(n) for n = 1..100000</a>
%F a(2n+1)=1; sum(k=1, n, a(k)) seems to be asymptotic to C*n with C=1.6... - _Benoit Cloitre_, Aug 21 2002
%e a(6) = 3 and the three values of k are 7,9 and 12.
%t f1[n_] := Count[Range[n, 2 n], _?(Differences[Take[Divisors[#], -2]] == {n} &)]; Join[{1}, Table[f1[n], {n, 2, 105}]] (* _Jayanta Basu_, Jul 30 2013 *)
%o (PARI) a(n)=sum(k=2,2*n,if(k- component(divisors(k),numdiv(k)-1)-n,0,1))
%Y Cf. A073932, A073933, A073934, A073935, A060681.
%K nonn
%O 1,2
%A _Amarnath Murthy_, Aug 19 2002
%E More terms from _Benoit Cloitre_ and _Vladeta Jovovic_, Aug 21 2002