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 #8 Nov 18 2023 13:12:08
%S 1,2,3,4,4,6,5,6,6,8,6,8,6,9,8,8,10,8,8,12,7,8,12,8,10,12,8,12,12,9,8,
%T 12,10,16,12,8,12,12,15,12,12,12,10,16,10,18,14,9,12,12,12,10,16,16,
%U 12,12,12,12,20,18,9,12,16,16,10,12,16,18,12,18,10,12
%N The number of divisors of the n-th practical number (A005153).
%C a(n) = A000005(A005153(n)).
%e A005153(1) = 1 and tau(1) = 1, so a(1) = 1.
%e A005153(2) = 2 and tau(2) = 2, so a(2) = 2.
%e A005153(3) = 4 and tau(4) = 3, so a(3) = 3.
%t f[p_, e_] := (p^(e + 1) - 1)/(p - 1); s[n_] := Module[{fct = FactorInteger[n], p, e}, p = fct[[;; , 1]]; e = fct[[;; , 2]]; If[Position[p/(1 + FoldList[Times, 1, f @@@ Most@ fct]), _?(# > 1 &)] == {}, Times @@ (e + 1), Nothing]]; s[1] = 1; Array[s, 320] (* _Amiram Eldar_, Oct 17 2023 *)
%o (Magma) sk:=func<n,k|&+[Divisors(n)[i]:i in [1..k]]>; ff:=func<n|forall{k:k in [2..#Divisors(n)]|sk(n,k-1) ge Divisors(n)[k]-1}>; a:=[]; for n in [1..400] do if ff(n) then Append(~a,#Divisors(n)); end if; end for; a;
%Y Cf. A000005, A005153.
%K nonn
%O 1,2
%A _Marius A. Burtea_, Oct 17 2023