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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

4, 6, 9, 10, 14, 15, 21, 25, 35, 49, 121, 143, 169, 187, 209, 221, 247, 253, 289, 299, 319, 323, 341, 361, 377, 391, 403, 407, 437, 451, 473, 481, 493, 517, 527, 529, 533, 551, 559, 583, 589, 611, 629, 649, 667, 671, 689, 697, 703, 713, 731, 737, 767, 779, 781
Offset: 1

Views

Author

Jason Earls, Jan 12 2003

Keywords

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

Examples

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

References

  • P. D. James, The Private Patient, Knopf, NY, 2008, p. 192. (from N. J. A. Sloane, Aug 27 2009)

Crossrefs

Programs

  • 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
    
  • 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 *)
    Select[Range[800],PrimeOmega[#]==2&&Length[Union[IntegerLength[FactorInteger[#][[;;,1]]]]]==1&] (* Harvey P. Dale, Jan 24 2025 *)
    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 *)
  • 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
    
  • 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)
    A078972 = sorted(A078972)
    # Chai Wah Wu, Aug 26 2014

Formula

a(n) = A239585(n) * A239586(n). - Reinhard Zumkeller, Mar 22 2014

Extensions

Edited by N. J. A. Sloane, Aug 27 2009

A239585 Prime factor <= other prime factor of n-th brilliant number, cf. A078972.

Original entry on oeis.org

2, 2, 3, 2, 2, 3, 3, 5, 5, 7, 11, 11, 13, 11, 11, 13, 13, 11, 17, 13, 11, 17, 11, 19, 13, 17, 13, 11, 19, 11, 11, 13, 17, 11, 17, 23, 13, 19, 13, 11, 19, 13, 17, 11, 23, 11, 13, 17, 19, 23, 17, 11, 13, 19, 11, 13, 17, 11, 19, 29, 23, 11, 13, 19, 29, 17, 11
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 22 2014

Keywords

Comments

a(n) = A020639(A078972(n)) = A078972(n) / A239586(n).
A055642(a(n)) = A055642(A239586(n)).

Examples

			      n  | A239585(n) | A239586(n) | A078972(n)   Lengths of factors
  -------+------------+------------+-----------   ------------------
      1  |        2   |        2   |        4          1
      5  |        2   |        7   |       14
     10  |        7   |        7   |       49
         |.........................|              ..................
     11  |       11   |       11   |      121          2
     78  |       11   |       97   |     1067
    100  |       37   |       37   |     1369
    241  |       97   |       97   |     9409
         |.........................|              ..................
    242  |      101   |      101   |    10201          3
   1000  |      193   |      263   |    50759
   2530  |      101   |      997   |   100697
  10000  |      743   |      937   |   696191
  10537  |      997   |      997   |   994009
         |.........................|              ..................
  10538  |     1009   |     1009   |  1018081          4
		

Crossrefs

Subsequence of A084126.

Programs

  • Haskell
    a239585 = a020639 . a078972
  • Mathematica
    Table[With[{f = FactorInteger[k]}, If[Total[f[[All, 2]]] == 2 && Length[Union[IntegerLength[f[[All, 1]]]]] == 1, f[[1, 1]], Nothing]], {k, 1000}] (* Paolo Xausa, Oct 02 2024 *)
    dlist2[d_] := Union[Times @@@ Tuples[Prime[Range[PrimePi[10^(d-1)] + 1, PrimePi[10^d]]], 2]]; (* Generates terms with d-digits prime factors -- faster but memory intensive *)
    Map[FactorInteger[#][[1, 1]]&, Flatten[Array[dlist2, 2]]] (* Paolo Xausa, Oct 09 2024 *)
Showing 1-2 of 2 results.