OFFSET
1,1
COMMENTS
"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]
Up to 10^8 the approximate sum of reciprocals is ~1.232884485... - Jason Earls, Oct 15 2010
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
REFERENCES
P. D. James, The Private Patient, Knopf, NY, 2008, p. 192. (from N. J. A. Sloane, Aug 27 2009)
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10537
Dario Alpern, Brilliant Numbers.
Christian N. K. Anderson, Ulam Spiral of n=1..3000.
FORMULA
EXAMPLE
1711 = 29*59 is in the sequence since both of its factors have two digits.
MATHEMATICA
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 *)
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 *)
Select[Range@1000, Differences@IntegerLength@Flatten@(ConstantArray@@#&/@FactorInteger[#]) == {0} &] (* Hans Rudolf Widmer, Oct 25 2022 *)
dlist2[d_] := Union[Times @@@ Tuples[Prime[Range[PrimePi[10^(d-1)] + 1, PrimePi[10^d]]], 2]]; (* Generates terms with d-digits prime factors *)
Flatten[Array[dlist2, 2]] (* Paolo Xausa, Oct 05 2024 *)
PROG
(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
(Haskell)
import Data.Function (on)
a078972 n = a078972_list !! (n-1)
a078972_list = filter brilliant a001358_list where
brilliant x = (on (==) a055642) p (x `div` p) where p = a020639 x
-- Reinhard Zumkeller, Nov 10 2013, Mar 22 2014
(Python)
from sympy import sieve
A078972 = []
for n in range(3):
pr = list(sieve.primerange(10**n, 10**(n+1)))
for i, p in enumerate(pr):
for q in pr[i:]:
A078972.append(p*q)
# Chai Wah Wu, Aug 26 2014
CROSSREFS
KEYWORD
base,easy,nonn,changed
AUTHOR
Jason Earls, Jan 12 2003
EXTENSIONS
Edited by N. J. A. Sloane, Aug 27 2009
STATUS
approved