A379569 Number of n-digit numbers that have exactly 6 divisors.
0, 16, 94, 654, 4863, 38243, 313705, 2658846, 23073712, 203859889, 1826368510, 16544195786, 151222451513, 1392635179004, 12906366376283, 120260052661235
Offset: 1
Examples
For n = 2 the a(2) = 16 numbers are 12, 18, 20, 28, 32, 44, 45, 50, 52, 63, 68, 75, 76, 92, 98, 99.
Programs
-
Python
from math import isqrt from sympy import primerange, primepi, integer_nthroot def _sum(N): return sum(primepi(N//(p * p)) for p in primerange(isqrt(N//2)+1)) - primepi(integer_nthroot(N, 3)[0]) + primepi(integer_nthroot(N, 5)[0]) def a379569(n): return sum(10**n) - _sum(10**(n-1)) # _David Radcliffe, Dec 29 2024
Formula
Sum_{i=1..n} a(i) = Sum_{p prime} PrimePi(10^n/p^2) - PrimePi(10^(n/3)) + PrimePi(10^(n/5)). - David Radcliffe, Dec 29 2024
Extensions
a(10)-a(15) from David Radcliffe, Dec 29 2024
a(16) from David Radcliffe, Jan 01 2025