login
a(n) is the number of positive integers that have n prime factors and these are all <= n.
1

%I #23 Nov 13 2024 17:16:29

%S 0,1,4,5,21,28,120,165,220,286,1365,1820,8568,11628,15504,20349,

%T 100947,134596,657800,888030,1184040,1560780,7888725,10518300,

%U 13884156,18156204,23535820,30260340,163011640,211915132,1121099408,1471442973,1917334783,2481256778,3190187286

%N a(n) is the number of positive integers that have n prime factors and these are all <= n.

%H Felix Huber, <a href="/A377537/b377537.txt">Table of n, a(n) for n = 1..5000</a>

%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/FundamentalTheoremofArithmetic.html">Fundamental Theorem of Arithmetic</a>

%F a(n) = binomial(pi(n) + n - 1, n) where pi = A000720.

%e a(2) = 1 because 1 positive integer has 2 prime factors <= 2: 4 = 2*2.

%e a(3) = 4 because 4 positive integers have 3 prime factors <= 3: 8 = 2*2*2, 12 = 2*2*3, 18 = 2*3*3, 27 = 3*3*3.

%e a(4) = 5 because 5 positive integers have 4 prime factors <= 4: 16 = 2*2*2*2, 24 = 2*2*2*3, 36 = 2*2*3*3, 54 = 2*3*3*3, 81 = 3*3*3*3.

%p A377537:=n->binomial(NumberTheory:-pi(n)+n-1,n);seq(A377537(n),n=1..35);

%t a[n_]:= Binomial[PrimePi[n] + n - 1, n]; Array[a,35] (* _Stefano Spezia_, Nov 04 2024 *)

%o (PARI) a(n) = binomial(primepi(n) + n - 1, n); \\ _Michel Marcus_, Nov 05 2024

%o (Python)

%o from math import comb

%o from sympy import primepi

%o def A377537(n): return comb(primepi(n)+n-1,n) # _Chai Wah Wu_, Nov 12 2024

%Y Cf. A000040, A000720, A001222, A037031, A113645, A343935.

%K nonn

%O 1,3

%A _Felix Huber_, Nov 04 2024