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-10 of 1773 results. Next

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

A338898 Concatenated sequence of prime indices of semiprimes (A001358).

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 1, 3, 1, 4, 2, 3, 2, 4, 1, 5, 3, 3, 1, 6, 2, 5, 1, 7, 3, 4, 1, 8, 2, 6, 1, 9, 4, 4, 2, 7, 3, 5, 2, 8, 1, 10, 1, 11, 3, 6, 2, 9, 1, 12, 4, 5, 1, 13, 3, 7, 1, 14, 2, 10, 4, 6, 2, 11, 1, 15, 3, 8, 1, 16, 2, 12, 3, 9, 1, 17, 4, 7, 5, 5, 1, 18, 2
Offset: 1

Views

Author

Gus Wiseman, Nov 15 2020

Keywords

Comments

This is a triangle with two columns and weakly increasing rows, namely {A338912(n), A338913(n)}.
A semiprime is a product of any two prime numbers. A prime index of n is a number m such that the m-th prime number divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The sequence of semiprimes together with their prime indices begins:
      4: {1,1}     46: {1,9}      91: {4,6}     141: {2,15}
      6: {1,2}     49: {4,4}      93: {2,11}    142: {1,20}
      9: {2,2}     51: {2,7}      94: {1,15}    143: {5,6}
     10: {1,3}     55: {3,5}      95: {3,8}     145: {3,10}
     14: {1,4}     57: {2,8}     106: {1,16}    146: {1,21}
     15: {2,3}     58: {1,10}    111: {2,12}    155: {3,11}
     21: {2,4}     62: {1,11}    115: {3,9}     158: {1,22}
     22: {1,5}     65: {3,6}     118: {1,17}    159: {2,16}
     25: {3,3}     69: {2,9}     119: {4,7}     161: {4,9}
     26: {1,6}     74: {1,12}    121: {5,5}     166: {1,23}
     33: {2,5}     77: {4,5}     122: {1,18}    169: {6,6}
     34: {1,7}     82: {1,13}    123: {2,13}    177: {2,17}
     35: {3,4}     85: {3,7}     129: {2,14}    178: {1,24}
     38: {1,8}     86: {1,14}    133: {4,8}     183: {2,18}
     39: {2,6}     87: {2,10}    134: {1,19}    185: {3,12}
		

Crossrefs

A112798 restricted to rows of length 2 gives this triangle.
A115392 is the row number for the first appearance of each positive integer.
A176506 gives row differences.
A338899 is the squarefree version.
A338912 is column 1.
A338913 is column 2.
A001221 counts a number's distinct prime indices.
A001222 counts a number's prime indices.
A001358 lists semiprimes.
A004526 counts 2-part partitions.
A006881 lists squarefree semiprimes.
A037143 lists primes and semiprimes.
A046315 and A100484 list odd and even semiprimes.
A046388 and A100484 list odd and even squarefree semiprimes.
A065516 gives first differences of semiprimes.
A084126 and A084127 give the prime factors of semiprimes.
A270650 and A270652 give the prime indices of squarefree semiprimes.
A320655 counts factorizations into semiprimes.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Join@@primeMS/@Select[Range[100],PrimeOmega[#]==2&]

A072000 Number of semiprimes (A001358) <= n.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 2, 2, 3, 4, 4, 4, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 8, 8, 9, 10, 10, 10, 10, 10, 10, 10, 11, 12, 13, 13, 13, 14, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 17, 17, 18, 18, 18, 18, 19, 19, 20, 21, 21, 21, 21, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24, 24, 25, 25, 25, 26
Offset: 1

Views

Author

Benoit Cloitre, Jun 19 2002

Keywords

Comments

Number of k <= n such that bigomega(k) = 2.

References

  • A. Hildebrand, On the number of prime factors of an integer, in Ramanujan Revisited (Urbana-Champaign, Ill., 1987), pp. 167-185, Academic Press, Boston, MA, 1988.
  • E. Landau, Handbuch der Lehre von der Verteilung der Primzahlen, vol. 1, Teubner, Leipzig, 1909; third edition : Chelsea, New York (1974).
  • G. Tenenbaum, Introduction à la théorie analytique et probabiliste des nombres, p. 203, Publications de l'Institut Cartan, 1990.

Crossrefs

Programs

  • Maple
    A072000 := proc(n) local sp,t ; sp := 0 ; for t from 1 to n do if numtheory[bigomega](t) = 2 then sp := sp+1 ; fi ; od ; sp ; end proc: # R. J. Mathar, Jun 10 2007
  • Mathematica
    semiPrimePi[n_] := Sum[ PrimePi[n/Prime@i] -i + 1, {i, PrimePi@Sqrt@n}]; Array[semiPrimePi, 78] (* Robert G. Wilson v, Jan 03 2006 *)
    (* If version >= 7 *) a[n_] := Select[Range[n], PrimeOmega[#] == 2 &] // Length; Table[a[n], {n, 1, 77}] (* Jean-François Alcover, Jun 29 2013 *)
    Accumulate[Table[If[PrimeOmega[n]==2,1,0],{n,100}]] (* Harvey P. Dale, Jun 14 2014 *)
  • PARI
    for(n=1,100,print1(sum(i=1,n,if(bigomega(i)-2,0,1)),","))
    
  • PARI
    a(n)=my(s=0,i=0); forprime(p=2, sqrt(n), s+=primepi(n\p); i++); s - i * (i-1)/2 \\ Charles R Greathouse IV, Apr 21 2011
    
  • Python
    from math import isqrt
    from sympy import primepi, prime
    def A072000(n): return int(sum(primepi(n//prime(k))-k+1 for k in range(1,primepi(isqrt(n))+1))) # Chai Wah Wu, Jul 23 2024

Formula

Let PrimePi(x) denote the number of primes <= x (cf. A000720). Then 2*a(n) = Sum_{ primes p <= n/2 } PrimePi(n/p) + PrimePi(sqrt(n)). [Landau, p. 211]
Let PrimePi(x) denote the number of primes <= x (cf. A000720). Then a(n) = Sum_{i=1..PrimePi(sqrt(n))} (PrimePi(n/prime(i)) - i + 1). - Robert G. Wilson v, Feb 07 2006
a(n) = card { x <= n : bigomega(x) = 2 }.
Asymptotically a(n) ~ n*log(log(n))/log(n). [Landau, p. 211]
Let A be a positive integer. Then card { x <= n : bigomega(x) = A } ~ (n/log(n))*log(log(n))^(A-1)/(A-1)! [Landau, p. 211]
a(n) = A072613(n) + A056811(n). - R. J. Mathar, Jun 10 2007
a(n) = Sum_{i=1..n} A064911(i). - Jonathan Vos Post, Dec 30 2007
a(n)*A064911(n) = A174956(n). - Reinhard Zumkeller, Apr 03 2010

Extensions

Edited by Robert G. Wilson v, Feb 15 2006

A085724 Numbers k such that 2^k - 1 is a semiprime (A001358).

Original entry on oeis.org

4, 9, 11, 23, 37, 41, 49, 59, 67, 83, 97, 101, 103, 109, 131, 137, 139, 149, 167, 197, 199, 227, 241, 269, 271, 281, 293, 347, 373, 379, 421, 457, 487, 523, 727, 809, 881, 971, 983, 997, 1061, 1063
Offset: 1

Views

Author

Jason Earls, Jul 20 2003

Keywords

Comments

Subsequence of A000430. Apart from 4, 9, and 49 composites in this sequence are greater than 1.9e7. - Charles R Greathouse IV, Jun 05 2013
1427 and 1487 are also terms. 1277 is the only remaining unknown below them. - Charles R Greathouse IV, Jun 05 2013
Among the known terms only 11, 23, 83 and 131 are in A002515, that is, they are the only known values for n such that (2^n - 1)/(2*n + 1) is prime. - Jianing Song, Jan 22 2019
Either a(n) is a prime, or the square of a Mersenne prime exponent. - M. F. Hasler, Jun 23 2025

Examples

			11 is a member because 2^11 - 1 = 23*89.
		

References

  • J. Earls, Mathematical Bliss, Pleroma Publications, 2009, pages 56-60. ASIN: B002ACVZ6O [From Jason Earls, Nov 22 2009]
  • J. Earls, "Cole Semiprimes," Mathematical Bliss, Pleroma Publications, 2009, pages 56-60. ASIN: B002ACVZ6O [From Jason Earls, Nov 25 2009]

Crossrefs

Programs

  • Mathematica
    SemiPrimeQ[n_]:=(n>1) && (2==Plus@@(Transpose[FactorInteger[n]][[2]])); Select[Range[100],SemiPrimeQ[2^#-1]&] (Noe)
    Select[Range[1100],PrimeOmega[2^#-1]==2&] (* Harvey P. Dale, Feb 18 2018 *)
    Select[Range[250], Total[Last /@ FactorInteger[2^# - 1, 3]] == 2 &] (* Eric W. Weisstein, Jul 28 2022 *)
  • PARI
    issemi(n)=bigomega(n)==2
    is(n)=if(isprime(n), issemi(2^n-1), my(q); isprimepower(n,&q)==2 && ispseudoprime(2^q-1) && ispseudoprime((2^n-1)/(2^q-1))) \\ Charles R Greathouse IV, Jun 05 2013

Extensions

More terms from Zak Seidov, Feb 27 2004
More terms from Cunningham project, Mar 23 2004
More terms from the Cunningham project sent by Robert G. Wilson v and T. D. Noe, Feb 22 2006
a(41)-a(42) from Charles R Greathouse IV, Jun 05 2013

A104494 Positive integers n such that n^17 + 1 is semiprime (A001358).

Original entry on oeis.org

2, 58, 66, 166, 268, 270, 408, 600, 672, 808, 822, 970, 1050, 1090, 1150, 1200, 1212, 1380, 1578, 1752, 1912, 1950, 1986, 2016, 2038, 2292, 2340, 2548, 2590, 2656, 2718, 2800, 2856, 3162, 3300, 3342, 3738, 4138, 4152, 4228, 4270, 4272, 4362, 4782, 5080, 5166
Offset: 1

Views

Author

Jonathan Vos Post, Apr 19 2005

Keywords

Examples

			2^17 + 1 = 131073 = 3 * 43691,
58^17 + 1 = 951208868148684143308060622849 = 59 * 16122184205909900734034925811,
66^17 + 1 = 8555529718761317069203003539457 = 67 * 127694473414348015958253784171,
1050^17 + 1 = 2292018317801032401637344360351562500000000000000001 = 1051 * 2180797638250268698037435166842590390104662226451.
		

Crossrefs

Programs

  • Magma
    IsSemiprime:=func< n | &+[ k[2]: k in Factorization(n) ] eq 2 >; [n: n in [1..1200]|IsSemiprime(n^17+1)]; // Vincenzo Librandi, Mar 10 2015
  • Mathematica
    Select[Range[1000000], PrimeQ[# + 1] && PrimeQ[(#^17 + 1)/(# + 1)] &] (* Robert Price, Mar 10 2015 *)
    Select[Range[5200],PrimeOmega[#^17+1]==2&] (* Harvey P. Dale, Mar 07 2017 *)
  • PARI
    for(n=1,3000,if(!ispseudoprime(n^17+1),forprime(p=1,10^4,if((n^17+1)%p==0,if(ispseudoprime((n^17+1)/p),print1(n,", "));break)))) \\ Derek Orr, Mar 09 2015
    

Formula

a(n)^17 + 1 is semiprime (A001358).

Extensions

a(14)-a(46) from Robert Price, Mar 09 2015

A289182 Positions of odd semiprimes in A001358.

Original entry on oeis.org

3, 6, 7, 9, 11, 13, 15, 17, 18, 19, 20, 23, 24, 26, 28, 30, 31, 32, 34, 36, 37, 39, 40, 42, 43, 44, 46, 48, 49, 51, 53, 54, 56, 57, 59, 60, 61, 63, 65, 66, 68, 69, 71, 72, 74, 75, 77, 78, 79, 80, 81, 83, 85, 86, 89, 90, 91, 92, 94, 95, 97, 98
Offset: 1

Views

Author

Zak Seidov, Jun 27 2017

Keywords

Comments

Complement to A115392.

Crossrefs

Programs

  • Mathematica
    sp=Select[Range[4,1000],2==PrimeOmega[#]&];Flatten[Position[Mod[sp, 2],1]]
  • PARI
    lista(nn) = vsp = select(x->(bigomega(x)==2), vector(nn, k, k)); select(x->(x%2), vsp, 1); \\ Michel Marcus, Jul 02 2017
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A289182(n):
        def iterfun(f,n=0):
            m, k = n, f(n)
            while m != k: m, k = k, f(k)
            return m
        def f(x): return int(-((t:=primepi(s:=isqrt(x)))*(t-1)>>1)+sum(primepi(x//p) for p in primerange(3,s+1)))
        return f(m:=iterfun(lambda x:int(n+x-f(x)),n))+primepi(m>>1) # Chai Wah Wu, Apr 03 2025

Formula

a(n) ~ n. - Charles R Greathouse IV, Jul 02 2017

A096932 Smallest number having exactly s divisors, where s is the n-th semiprime (A001358).

Original entry on oeis.org

6, 12, 36, 48, 192, 144, 576, 3072, 1296, 12288, 9216, 196608, 5184, 786432, 36864, 12582912, 46656, 589824, 82944, 2359296, 805306368, 3221225472, 331776, 37748736, 206158430208, 746496, 3298534883328, 5308416, 13194139533312, 2415919104, 2985984, 9663676416
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 15 2004

Keywords

Comments

This is to smallest integer for which the number of divisors is the n-th prime (A061286) as semiprimes (A001358) are to primes (A000040). - Jonathan Vos Post, Feb 03 2011

Crossrefs

Programs

  • Mathematica
    s[n_] := Module[{f = FactorInteger[n], p, q}, If[Total[f[[;;,2]]] == 2, p=f[[1,1]]; q = n/p; 2^(q-1) * 3^(p-1) ,Nothing]]; Array[s, 100] (* Amiram Eldar, Apr 13 2024 *)

Formula

A000005(a(n)) = A001358(n) and A000005(m) <> A001358(n) for m < a(n).
a(n) = A005179(A001358(n)).
a(p*q) = 2^(q-1) * 3^(p-1) for primes p <= q.
a(A000040(i)*A000040(j)) = 2^(A084127(j)-1) * 3^(A084127(i)-1) for i <= j.

A104335 Positive integers n such that n^14 + 1 is semiprime (A001358).

Original entry on oeis.org

4, 74, 94, 116, 270, 464, 556, 654, 1140, 1156, 1246, 1306, 1736, 2464, 2470, 2604, 2804, 2836, 2900, 3054, 3890, 4006, 4056, 4330, 4736, 4780, 5016, 5294, 5340, 5486, 5700, 5834, 6434, 7114, 7304, 8626, 8880, 9164, 9546, 9744, 9980, 10086, 10166
Offset: 1

Views

Author

Jonathan Vos Post, Apr 17 2005

Keywords

Comments

x^14+1 has factors (1 + x^2) (1 - x^2 + x^4 - x^6 + x^8 - x^10 + x^12).

Examples

			4^14 + 1 = 268435457 = 17 * 15790321,
74^14 + 1 = 147653612273582215982104577 = 5477 * 26958848324553992328301,
1140^14 + 1 = 6261349103849104148619671961600000000000001 = 1299601 * 4817901112610027345792802530622860401.
		

Crossrefs

Programs

  • Mathematica
    Select[ Range[2, 10422, 2], PrimeQ[ #^2 + 1] && PrimeQ[ #^12 - #^10 + #^8 - #^6 + #^4 - #^2 + 1] &] (*Robert G. Wilson v, Apr 18 2005 *)
    Select[Range[2,10200,2],PrimeOmega[#^14+1]==2&] (* Harvey P. Dale, Oct 16 2011 *)

Extensions

More terms from Robert G. Wilson v, Apr 18 2005

A104479 Positive integers n such that n^16 + 1 is semiprime (A001358).

Original entry on oeis.org

3, 4, 9, 12, 14, 16, 18, 20, 26, 29, 40, 41, 48, 58, 70, 73, 81, 87, 92, 96, 104, 111, 113, 114, 118, 122, 130, 140, 142, 144, 146, 150, 157, 162, 164, 167, 168, 172, 173, 184, 187, 192, 194, 195, 199, 200, 202, 208, 220, 230, 232, 244, 253, 256, 266, 278, 292, 295, 298
Offset: 1

Views

Author

Jonathan Vos Post, Apr 18 2005

Keywords

Comments

n^16 + 1 is an irreducible polynomial over Z and thus can be either prime (A006313) or semiprime.

Examples

			3^16 + 1 = 43046722 = 2 * 21523361,
4^16 + 1 = 4294967297 = 641 * 6 700417,
9^16 + 1 = 1853020188851842 = 2 * 926510094425921,
12^16 + 1 = 184884258895036417 = 153953 * 1200913648289,
200^16 + 1 = 6553600000000000000000000000000000001 =
162123499503471553 * 40423504427621041217.
		

Crossrefs

Programs

  • Magma
    IsSemiprime:=func< n | &+[ k[2]: k in Factorization(n) ] eq 2 >; [n: n in [2..300]|IsSemiprime(n^16+1)] // Vincenzo Librandi, Dec 21 2010
  • Mathematica
    Select[Range[300],PrimeOmega[#^16+1]==2&] (* Harvey P. Dale, Aug 21 2011 *)
    Select[Range[1000], 2 == Total[Transpose[FactorInteger[#^16 + 1]][[2]]] &] (* Robert Price, Mar 11 2015 *)

Formula

a(n)^16 + 1 is semiprime (A001358).

Extensions

More terms from Vincenzo Librandi, Dec 21 2010
Corrected (adding 202, 208, and 220) by Harvey P. Dale, Aug 21 2011

A104657 Positive integers n such that n^19 + 1 is semiprime (A001358).

Original entry on oeis.org

2, 10, 28, 106, 190, 292, 556, 756, 858, 906, 1012, 1030, 1032, 1060, 1372, 1450, 1488, 1720, 1722, 1758, 1782, 1822, 1972, 2356, 2436, 2446, 2620, 2748, 2788, 2998, 3186, 3300, 3318, 3360, 3466, 3510, 3822, 3852, 4138, 4326, 4506, 4908, 5236, 5518, 5782
Offset: 1

Views

Author

Jonathan Vos Post, Apr 21 2005

Keywords

Comments

We have the polynomial factorization: n^19 + 1 = (n + 1) * (n^18 - n^17 + n^16 - n^15 + n^14 - n^13 + n^12 - n^11 + n^10 - n^9 + n^8 - n^7 + n^6 - n^5 + n^4 - n^3 + n^2 - n + 1). Hence after the initial n=1 prime the binomial can never be prime. It can be semiprime iff n+1 is prime and (n^18 - n^17 + n^16 - n^15 + n^14 - n^13 + n^12 - n^11 + n^10 - n^9 + n^8 - n^7 + n^6 - n^5 + n^4 - n^3 + n^2 - n + 1) is prime.

Examples

			2^19 + 1 = 524289 = 3 * 174763,
10^19 + 1 = 10000000000000000001 = 11 * 909090909090909091,
1012^19 + 1 = 125438178100868833265294241234853844232270960601988910249 = 1013 * 1238284087866424810121364671617510801898035149081825373.
		

Crossrefs

Programs

  • Magma
    IsSemiprime:=func< n | &+[ k[2]: k in Factorization(n) ] eq 2 >; [n: n in [1..1100]|IsSemiprime(n^19+1)]; // Vincenzo Librandi, Mar 10 2015
  • Mathematica
    Select[Range[1000000], PrimeQ[# + 1] && PrimeQ[(#^19 + 1)/(# + 1)] &] (* Robert Price, Mar 10 2015 *)
    Select[Range[5800],PrimeOmega[#^19+1]==2&] (* Harvey P. Dale, Feb 15 2019 *)

Formula

a(n)^19 + 1 is semiprime (A001358).

Extensions

a(12)-a(45) from Robert Price, Mar 09 2015
Showing 1-10 of 1773 results. Next