A377537 a(n) is the number of positive integers that have n prime factors and these are all <= n.
0, 1, 4, 5, 21, 28, 120, 165, 220, 286, 1365, 1820, 8568, 11628, 15504, 20349, 100947, 134596, 657800, 888030, 1184040, 1560780, 7888725, 10518300, 13884156, 18156204, 23535820, 30260340, 163011640, 211915132, 1121099408, 1471442973, 1917334783, 2481256778, 3190187286
Offset: 1
Keywords
Examples
a(2) = 1 because 1 positive integer has 2 prime factors <= 2: 4 = 2*2. 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. 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.
Links
- Felix Huber, Table of n, a(n) for n = 1..5000
- Eric Weisstein's World of Mathematics, Fundamental Theorem of Arithmetic
Programs
-
Maple
A377537:=n->binomial(NumberTheory:-pi(n)+n-1,n);seq(A377537(n),n=1..35);
-
Mathematica
a[n_]:= Binomial[PrimePi[n] + n - 1, n]; Array[a,35] (* Stefano Spezia, Nov 04 2024 *)
-
PARI
a(n) = binomial(primepi(n) + n - 1, n); \\ Michel Marcus, Nov 05 2024
-
Python
from math import comb from sympy import primepi def A377537(n): return comb(primepi(n)+n-1,n) # Chai Wah Wu, Nov 12 2024
Formula
a(n) = binomial(pi(n) + n - 1, n) where pi = A000720.