login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A078972 Brilliant numbers: semiprimes (products of two primes, A001358) whose prime factors have the same number of decimal digits. 84

%I #57 Jul 07 2023 16:45:08

%S 4,6,9,10,14,15,21,25,35,49,121,143,169,187,209,221,247,253,289,299,

%T 319,323,341,361,377,391,403,407,437,451,473,481,493,517,527,529,533,

%U 551,559,583,589,611,629,649,667,671,689,697,703,713,731,737,767,779,781

%N Brilliant numbers: semiprimes (products of two primes, A001358) whose prime factors have the same number of decimal digits.

%C "Brilliant numbers, as defined by Peter Wallrodt, are numbers with two prime factors of the same length (in decimal notation). These numbers are generally used for cryptographic purposes and for testing the performance of prime factoring programs." [Alpern]

%C Up to 10^8 the approximate sum of reciprocals is ~1.232884485... - _Jason Earls_, Oct 15 2010

%C Let f(n) = a(n) - floor(sqrt(a(n)))^2, or how much larger a(n) is than the largest square number <= a(n). Then f(n) is odd for all even squares, and even for all odd squares where n > 5. See "Ulam spiral" in links. - _Christian N. K. Anderson_, Jun 12 2013

%D P. D. James, The Private Patient, Knopf, NY, 2008, p. 192. (from _N. J. A. Sloane_, Aug 27 2009)

%H T. D. Noe, <a href="/A078972/b078972.txt">Table of n, a(n) for n = 1..10537</a>

%H Dario Alpern, <a href="https://www.alpertron.com.ar/BRILLIANT.HTM">Brilliant Numbers</a>.

%H Christian N. K. Anderson, <a href="/A078972/a078972.gif">Ulam Spiral</a> of n=1..3000.

%F a(n) = A239585(n) * A239586(n). - _Reinhard Zumkeller_, Mar 22 2014

%e 1711 = 29*59 is in the sequence since both of its factors have two digits.

%t fQ[n_] := Block[{fi = FactorInteger@n}, Plus @@ Last /@ fi == 2 && Floor[ Log[10, fi[[1, 1]] ]] == Floor[ Log[10, fi[[ -1, 1]] ]]]; Select[ Range@792, fQ@# &] (* _Robert G. Wilson v_, May 26 2006 *)

%t brilQ[n_]:=Module[{fin=FactorInteger[n]}, Total[Transpose[fin][[2]]]==2 && Length[Union[IntegerLength[Transpose[fin][[1]]]]]==1]; Select[Range[1000],brilQ] (* _Harvey P. Dale_, Feb 06 2011 *)

%t Select[Range@1000, Differences@IntegerLength@Flatten@(ConstantArray@@#&/@FactorInteger[#]) == {0} &] (* _Hans Rudolf Widmer_, Oct 25 2022 *)

%o (PARI) is(n)=my(f=factor(n));(#f[,1]==1 && f[1,2]==2) || (#f[,1]==2 && f[1,2]==1 && f[2,2]==1 && #Str(f[1,1])==#Str(f[2,1])) \\ _Charles R Greathouse IV_, Jun 16 2011

%o (Haskell)

%o import Data.Function (on)

%o a078972 n = a078972_list !! (n-1)

%o a078972_list = filter brilliant a001358_list where

%o brilliant x = (on (==) a055642) p (x `div` p) where p = a020639 x

%o -- _Reinhard Zumkeller_, Nov 10 2013, Mar 22 2014

%o (Python)

%o from sympy import sieve

%o A078972 = []

%o for n in range(3):

%o pr = list(sieve.primerange(10**n,10**(n+1)))

%o for i,p in enumerate(pr):

%o for q in pr[i:]:

%o A078972.append(p*q)

%o A078972 = sorted(A078972)

%o # _Chai Wah Wu_, Aug 26 2014

%Y Cf. A001358, A085647, A084126, A084127, A055642, A085721.

%K base,easy,nonn

%O 1,1

%A _Jason Earls_, Jan 12 2003

%E Edited by _N. J. A. Sloane_, Aug 27 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)