Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #13 Sep 06 2024 15:09:52
%S 0,1,1,2,1,2,1,3,2,2,1,2,1,2,2,4,1,3,1,3,2,2,1,2,2,2,3,3,1,2,1,5,2,2,
%T 2,2,1,2,2,3,1,3,1,3,2,2,1,2,2,3,2,3,1,4,2,3,2,2,1,2,1,2,2,6,2,3,1,3,
%U 2,2,1,2,1,2,3,3,2,3,1,3,4,2,1,2,2,2,2
%N The number of integers that are smaller than n and whose array of divisors begins like the array of divisors of n.
%C For a prime power n = p^q, a(n) = q.
%C Records are obtained for 1, 2, 4, 8, ... (A000079).
%C It appears that a(n) <= A001222(n).
%C Numbers such that a(n) < A001221(n) are: 30, 60, 70, 84, 90, 105, ...
%C Numbers such that A001221(n) <= a(n) < A001222(n) are: 12, 24, 36, 40, 45, 48, 56, 63, 72, 80, 96, 108, ...
%H Giovanni Resta, <a href="/A235875/b235875.txt">Table of n, a(n) for n = 1..1000</a>
%e The divisors of 5 are [1, 5], and the divisors of 1 to 4 are [1], [1, 2], [1, 3], [1, 2, 4]. Among these, only the divisors of 1 begin like those of 5. Hence a(5) = 1.
%e The divisors of 6 are [1, 2, 3, 6], and the divisors of 1 to 5 are [1], [1, 2], [1, 3], [1, 2, 4], [1, 5]. Among these, only the divisors of 1 and 2 begin like those of 6. Hence a(6) = 2.
%t a[n_] := Length@ Select[Union@ FoldList[LCM, 1, Most@(d = Divisors@n)], # < n && (e = Divisors@#; e == Take[d, Length@e]) &]; Array[a, 87] (* _Giovanni Resta_, Jan 16 2014 *)
%o (PARI) a(n) = {d = divisors(n); nb = 0; for (i = 1, n-1, di = divisors(i); if ((#di <= #d) && (sum(k=1, #di, di[k] == d[k]) == #di), nb++);); nb;}
%Y Cf. A027750.
%K nonn
%O 1,4
%A _Michel Marcus_, Jan 16 2014