cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A376703 3-brilliant numbers: numbers which are the product of three primes having the same number of decimal digits.

This page as a plain text file.
%I A376703 #33 Oct 08 2024 18:38:38
%S A376703 8,12,18,20,27,28,30,42,45,50,63,70,75,98,105,125,147,175,245,343,
%T A376703 1331,1573,1859,2057,2197,2299,2431,2717,2783,2873,3179,3211,3289,
%U A376703 3509,3553,3751,3757,3887,3971,4147,4199,4301,4433,4477,4693,4807,4901,4913,4961,5083
%N A376703 3-brilliant numbers: numbers which are the product of three primes having the same number of decimal digits.
%H A376703 Michael S. Branicky, <a href="/A376703/b376703.txt">Table of n, a(n) for n = 1..10000</a>
%H A376703 Dario Alpern, <a href="https://www.alpertron.com.ar/BRILLIANT3.HTM">3-Brilliant Numbers</a>.
%e A376703 4961 is a term because 4961 = 11 * 11 * 41, and these three prime factors have the same number of digits.
%t A376703 A376703Q[k_] := With[{f = FactorInteger[k]}, Total[f[[All, 2]]] == 3 && Length[Union[IntegerLength[f[[All, 1]]]]] == 1];
%t A376703 Select[Range[6000], A376703Q] (* or *)
%t A376703 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 *)
%t A376703 Flatten[Array[dlist3, 2]]
%o A376703 (Python)
%o A376703 from sympy import factorint
%o A376703 def ok(n):
%o A376703     f = factorint(n)
%o A376703     return sum(f.values()) == 3 and len(set([len(str(p)) for p in f])) == 1
%o A376703 print([k for k in range(5100) if ok(k)]) # _Michael S. Branicky_, Oct 05 2024
%o A376703 (Python)
%o A376703 from math import prod
%o A376703 from sympy import primerange
%o A376703 from itertools import count, combinations_with_replacement as cwr, islice
%o A376703 def bgen(d): # generator of terms that are products of d-digit primes
%o A376703     primes, out = list(primerange(10**(d-1), 10**d)), set()
%o A376703     for t in cwr(primes, 3): out.add(prod(t))
%o A376703     yield from sorted(out)
%o A376703 def agen(): # generator of terms
%o A376703     for d in count(1): yield from bgen(d)
%o A376703 print(list(islice(agen(), 50))) # _Michael S. Branicky_, Oct 05 2024
%Y A376703 Subsequence of A014612.
%Y A376703 Cf. A078972, A083128, A083182, A376704.
%K A376703 nonn,base
%O A376703 1,1
%A A376703 _Paolo Xausa_, Oct 02 2024