login
A376703
3-brilliant numbers: numbers which are the product of three primes having the same number of decimal digits.
6
8, 12, 18, 20, 27, 28, 30, 42, 45, 50, 63, 70, 75, 98, 105, 125, 147, 175, 245, 343, 1331, 1573, 1859, 2057, 2197, 2299, 2431, 2717, 2783, 2873, 3179, 3211, 3289, 3509, 3553, 3751, 3757, 3887, 3971, 4147, 4199, 4301, 4433, 4477, 4693, 4807, 4901, 4913, 4961, 5083
OFFSET
1,1
LINKS
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
Subsequence of A014612.
Sequence in context: A226527 A212582 A046369 * A066428 A228056 A187042
KEYWORD
nonn,base
AUTHOR
Paolo Xausa, Oct 02 2024
STATUS
approved