|
|
A174322
|
|
a(n) is the smallest n-digit number with exactly 4 divisors.
|
|
2
|
|
|
6, 10, 106, 1003, 10001, 100001, 1000001, 10000001, 100000001, 1000000006, 10000000003, 100000000007, 1000000000007, 10000000000015, 100000000000013, 1000000000000003, 10000000000000003, 100000000000000015, 1000000000000000007, 10000000000000000001
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
a(n) = the smallest n-digit number of the form p^3 or p^1*q^1, (p, q = distinct primes).
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
Table[k=10^(n-1); While[DivisorSigma[0, k] != 4, k++]; k, {n, 10}]
|
|
PROG
|
(Python)
from sympy import divisors
def a(n):
k = 10**(n-1)
while len(divisors(k)) != 4: k += 1
return k
(Python) # faster alternative for larger terms
from sympy import divisors
def a(n):
k = 10**(n-1) - 1
divs = -1
while divs != 4:
k += 1
divs = 0
for d in divisors(k, generator=True):
divs += 1
if divs > 4: break
return k
|
|
CROSSREFS
|
Cf. A182648 (largest n-digit numbers with exactly 4 divisors).
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|