login

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”).

Number of integers m from 1 through n inclusive such that d_i(n)<=d_i(m) for 1<=i<=Min(d(n),d(m)) where d_i(n) denotes the i-th smallest divisor of n and d(n) denotes the number of divisors of n (A000005).
5

%I #8 Oct 31 2013 12:17:44

%S 1,2,2,4,2,6,2,7,5,7,2,12,2,9,8,14,2,17,2,17,10,10,2,24,9,12,12,23,2,

%T 28,2,25,13,14,12,35,2,15,14,34,2,36,2,30,23,17,2,48,14,33,18,34,2,46,

%U 18,45,19,19,2,60,2,21,30,49,20,54,2,41,22,47,2,71,2,24,36,45,21,63,2,67

%N Number of integers m from 1 through n inclusive such that d_i(n)<=d_i(m) for 1<=i<=Min(d(n),d(m)) where d_i(n) denotes the i-th smallest divisor of n and d(n) denotes the number of divisors of n (A000005).

%C In other words, number of integers m in {1,...,n} such that the i-th divisor of m is >= the i-th divisor of n, for i=1,...,min(A000005(m),A000005(n)).

%H Robert G. Wilson v, <a href="/A137849/b137849.txt">Table of n, a(n) for n = 1..10000</a>.

%F a(n) = 2 iff n is prime.

%e a(10) = 7 because there are 7 integers, 1, 2, 3, 5, 7, 9 and 10, whose divisors meet the criterion for n = 10 (4 does not meet this criterion in that 4's 3rd smallest divisor is 4 and 10's third smallest divisor is 5; similarly 6 and 8 do not meet the criterion).

%t f[n_] := Block[{c = 1, d = Divisors@ n, k = DivisorSigma[0, n], m = 1}, While[m != n, If[ Min[ PadRight[ Divisors@ m, k, n] - d] > -1, c++ ]; m++ ]; c]; Array[f, 80] (* _Robert G. Wilson v_ *)

%o (PARI) A137849(n)={ local( d=divisors(n), d2 ); sum( m=1,n, d2=divisors(m); vecmin( vector(min(#d,#d2),i,d2[i]-d[i]))>=0 )} \\ - M. F. Hasler, May 01 2008

%Y Cf. A094783 (numbers where a(n) = n), Records: A140067.

%K nonn

%O 1,2

%A _J. Lowell_, Apr 29 2008

%E Edited and extended by _M. F. Hasler_ and _Ray Chandler_, May 01 2008