OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
Dario Alpern, 3-Brilliant Numbers.
EXAMPLE
4961 is a term because 4961 = 11 * 11 * 41, and these three prime factors have the same number of digits.
MATHEMATICA
A376703Q[k_] := With[{f = FactorInteger[k]}, Total[f[[All, 2]]] == 3 && Length[Union[IntegerLength[f[[All, 1]]]]] == 1];
Select[Range[6000], A376703Q] (* or *)
dlist3[d_] := Sort[Times @@@ DeleteDuplicates[Map[Sort, Tuples[Prime[Range[PrimePi[10^(d-1)] + 1, PrimePi[10^d]]], 3]]]]; (* Generates terms with d-digits prime factors -- faster but memory intensive *)
Flatten[Array[dlist3, 2]]
PROG
(Python)
from sympy import factorint
def ok(n):
f = factorint(n)
return sum(f.values()) == 3 and len(set([len(str(p)) for p in f])) == 1
print([k for k in range(5100) if ok(k)]) # Michael S. Branicky, Oct 05 2024
(Python)
from math import prod
from sympy import primerange
from itertools import count, combinations_with_replacement as cwr, islice
def bgen(d): # generator of terms that are products of d-digit primes
primes, out = list(primerange(10**(d-1), 10**d)), set()
for t in cwr(primes, 3): out.add(prod(t))
yield from sorted(out)
def agen(): # generator of terms
for d in count(1): yield from bgen(d)
print(list(islice(agen(), 50))) # Michael S. Branicky, Oct 05 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo Xausa, Oct 02 2024
STATUS
approved