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 17 results. Next

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

A092561 "Mersenne" semiprimes, semiprimes of the form 2^k-1.

Original entry on oeis.org

15, 511, 2047, 8388607, 137438953471, 2199023255551, 562949953421311, 576460752303423487, 147573952589676412927, 9671406556917033397649407, 158456325028528675187087900671, 2535301200456458802993406410751
Offset: 1

Views

Author

Zak Seidov, Feb 27 2004

Keywords

Examples

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

Crossrefs

Corresponding k: A085724.

Programs

  • Mathematica
    a := Select[Range[2,120], ! PrimeQ[2^# - 1] && Length[Divisors[2^# - 1]] <= 4 &]; 2^a - 1 (* Stefan Steinerberger, Apr 12 2006 *)
    Select[2^Range[0,110]-1, PrimeOmega[#] == 2&] (* Harvey P. Dale, Feb 22 2013 *)

Formula

a(n) = A000225(A085724(n)). - Amiram Eldar, Jun 18 2022

Extensions

One more term from Stefan Steinerberger, Apr 12 2006

A073936 Numbers k such that 2^k + 1 is the product of two distinct primes.

Original entry on oeis.org

5, 6, 7, 11, 12, 13, 17, 19, 20, 23, 28, 31, 32, 40, 43, 61, 64, 79, 92, 101, 104, 127, 128, 148, 167, 191, 199, 256, 313, 347, 356, 596, 692, 701, 1004, 1228, 1268, 1709, 2617, 3539, 3824, 5807, 10501, 10691, 11279, 12391, 14479, 42737, 83339, 95369, 117239
Offset: 1

Views

Author

Labos Elemer, Aug 13 2002

Keywords

Comments

Original name: "2^n + 1 is squarefree and has exactly 2 prime factors."
From Giuseppe Coppoletta, May 08 2017: (Start)
As 3 divides 2^a(n) + 1 for any odd term a(n), all odd terms are prime and exactly the Wagstaff primes (A000978), at the exclusion of 3 (which gives 2^3 + 1 = 3^2 not squarefree).
For the even terms, let a(n) = d * 2^j with d odd integer and j > 0. If d > 1, as (2^2^j)^q + 1 divides 2^a(n) + 1 for any odd prime q dividing d, then d must be prime.
So the even terms are all given by the following two class:
a) (d = 1) a(n) = 2^j such that Fj is a semiprime Fermat number. Up to now, only j = 5, 6, 7, 8 are known to give a Fermat semiprime, giving the even terms 32, 64, 128 and 256. We are also assured that 2^j is not a term for j = 9..19 because Fj is not a semiprime for those value of j (see Wagstaf's link). F20 is the first composite Fermat number which could give another even term (it would be 2^20 = 1048576). However, it seems highly unlikely that other Fermat semiprimes could exist.
b) (d = p odd prime) a(n) = p * 2^j with j such that Fj is a Fermat prime and p a prime verifying ((Fj - 1)^p + 1)/Fj is a prime.
Exemplifying that, we have:
for j = 1 this gives only the even term a(2) = 2 * 3 = 6 (see Jack Brennen's result in ref),
for j = 2 we have all the terms of type 2^2 * A057182.
for j = 3 the even terms are of type 2^3 * A127317.
For j = 4 at least up to 200000, there is only the term a(41) = 2^4 * 239 = 3824 (see comment in A127317).
All terms after a(50) refer to probabilistic primality tests for 2^a(n) + 1 (see Caldwell's link for the list of the largest certified Wagstaff primes).
After a(56), from the above, the primes 267017, 269987, 374321, 986191, 4031399 and the even value 4101572 are also terms, but still remains the (remote) possibility of some gaps in between. In addition, 13347311 and 13372531 are also terms, but possibly much further in the numbering (see comments in A000978).
(End)
Intersection of A092559 and A066263. - Eric Chen, Jun 13 2018

Examples

			11 is a member because 1 + 2^11 = 2049 = 3 * 683.
9 is not a term because 1 + 2^9 = 513 = 3^3 * 19
		

Crossrefs

Cf. A000005, A000051, A046798, A092559, A000978. Different from A066263.

Programs

  • Mathematica
    Do[ If[ Length[ Divisors[1 + 2^n]] == 4, Print[n]], {n, 1, 200}]
    (* Second program: *)
    Select[Range@ 200, DivisorSigma[0, 2^# + 1] == 4 &] (* Michael De Vlieger, May 09 2017 *)
  • Sage
    [n for n in xsrange(3,200) if sigma(2^n+1,0)==4]
    # Second program (faster):
    
  • Sage
    v=[]; N=2000
    for n in xsrange(4,N):
        j=valuation(n,2)
        if j<5:
            Fj=2^2^j+1; p=ZZ(n/2^j); q=ZZ((2^n+1)/Fj)
            if p.is_prime() and q.is_prime(proof=false): v.append(n)
        elif j<9 and n.is_power_of(2): v.append(n)
    print(v) # Giuseppe Coppoletta, May 11 2017

Formula

Solutions to A000005[A000051(x)]=4 or A046798[x]=4

Extensions

Edited by Robert G. Wilson v, Aug 19 2002
a(28)-a(51) by Giuseppe Coppoletta, May 02 2017
Name reworded by Jon E. Schoenfield, Jun 15 2018

A092558 Numbers k such that 2^k +- 1 are both semiprimes.

Original entry on oeis.org

11, 23, 101, 167, 199, 347
Offset: 1

Views

Author

Zak Seidov, Feb 27 2004

Keywords

Comments

Intersection of A092559 and A085724.
a(7), if it exists, is at least 41519. - Charles R Greathouse IV, Jun 05 2013
2^41519 + 1 is the product of 3 and a composite number, so if a(7) exists, it exceeds 41519. - Jon E. Schoenfield, Feb 22 2022

Examples

			11 is a term because 2^11 - 1 = 23*89 and 2^11 + 1 = 3*683.
		

Crossrefs

Subsequence of A000040.

Programs

  • PARI
    is(n)=isprime(n) && n>7 && ispseudoprime((2^n+1)/3) && bigomega(2^n-1)==2 \\ Charles R Greathouse IV, Jun 05 2013

Extensions

a(6) from Robert G. Wilson v, Apr 18 2006

A092562 Semiprimes of the form 2^k + 1.

Original entry on oeis.org

9, 33, 65, 129, 2049, 4097, 8193, 131073, 524289, 1048577, 8388609, 268435457, 2147483649, 4294967297, 1099511627777, 8796093022209, 2305843009213693953, 18446744073709551617, 604462909807314587353089, 4951760157141521099596496897
Offset: 1

Views

Author

Zak Seidov, Feb 27 2004

Keywords

Examples

			2049 is a member because 2049 = 2^11+1 = 3*683.
		

Crossrefs

Corresponding k: A092559.

Programs

  • Magma
    IsSemiprime:=func; [s: n in [2..100] | IsSemiprime(s) where s is 2^n+1]; // Vincenzo Librandi, Sep 21 2012
  • Mathematica
    Select[Table[2^n + 1, {n, 100}], PrimeOmega[#] == 2&] (* Vincenzo Librandi, Sep 21 2012 *)

Formula

a(n) = A000051(A092559(n)). - Amiram Eldar, Jun 18 2022

A066263 Numbers k such that 2^k + 1 has just two distinct prime factors.

Original entry on oeis.org

5, 6, 7, 9, 10, 11, 12, 13, 17, 19, 20, 23, 28, 31, 32, 40, 43, 61, 64, 79, 92, 101, 104, 127, 128, 148, 167, 191, 199, 256, 313, 347, 356, 596, 692, 701, 1004, 1228, 1268, 1709, 2617, 3539, 3824, 5807, 10501, 10691, 11279, 12391, 14479, 42737, 83339, 95369
Offset: 1

Views

Author

Benoit Cloitre, Dec 31 2001

Keywords

Comments

From Giuseppe Coppoletta, May 16 2017: (Start)
All terms after a(52) refer to probabilistic primality tests for 2^a(n) + 1 (see Caldwell's link for the list of the largest certified Wagstaff primes). After a(58), 267017, 269987, 374321, 986191, 4031399 and 4101572 are also terms, but there still remains the remote possibility of some gaps in between. In addition, 13347311 and 13372531 are also terms, but possibly much farther in the numbering (see comments in A000978).
For the relation with Fermat numbers and for the primality of odd terms, see comments in A073936. The terms 9 and 10 give a value of 2^n + 1 which is not squarefree, so they are not in A073936. For the rest, the actually known terms of the two sequences coincide. In order to verify if any other term could be found hereafter that is not in A073936, all we have to do is to examine the terms for which 2^n + 1 is not squarefree. Considering that 3 divides 2^a(n) + 1 for any odd term a(n) and using Zsigmondy's and Mihăilescu-Catalan's theorems (see links), one can verify that any nonsquarefree term greater than 9 has to be of the form a(n) = 2^j * Fj, where Fj is the Fermat prime 2^2^j + 1. So basically we have to see if ((Fj-1)^Fj + 1)/(Fj)^2 is a prime or the power of a prime for any Fermat prime Fj. The case j = 1 gives the term a(n) = 10 because (4^5 + 1)/5^2 = 41 is a prime, while for j = 2, (16^17 + 1)/17^2 = 354689 * 2879347902817 is composite. Similarly (256^257 + 1)/257^2 is neither a prime nor the power of a prime, so there is no contribution from the cases j = 2, 3 (see also comments in A127317).
For j = 4 and for any possible other Fermat prime which could be found later, the question is still open, in the sense that it is not actually known if n = 16 * F4 = 1048592 is a term or not. That seems very unlikely, but in order to decide that question for j = 4, one would have to check if (2^1048592 + 1)/65537^2 is a prime or the power of a prime. As this number has 315649 digits, I wonder if it is possible to handle it with the existing primality tests.
(End)

Examples

			3 and 4 are not terms because 2^3 + 1 and 2^4 + 1 have only a single prime factor (counted without multiplicity).
6 and 10 are terms because 2^6 + 1 = 5 * 13 and 2^10 + 1 = 5^2 * 41 have two distinct prime factors.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := First[ Transpose[ FactorInteger[2^n + 1]]]; Select[ Range[100], Length[f[ # ]] == 2 & ]
    Select[Range[1300],PrimeNu[2^#+1]==2&] (* Harvey P. Dale, Nov 28 2014 *)
  • PARI
    isok(k) = #factor(2^k+1)~ == 2; \\ Michel Marcus, Nov 14 2017

Formula

A001221(2^a(n) + 1) = 2.

Extensions

Edited by Robert G. Wilson v, Jan 03 2002
a(40)-a(52) by Giuseppe Coppoletta, May 02 2017

A127317 Numbers n such that (256^n + 1)/257 is prime.

Original entry on oeis.org

5, 13, 23029
Offset: 1

Views

Author

Alexander Adamchuk, Mar 29 2007

Keywords

Comments

All terms are primes. Largest currently known prime of the form (2^n + 1)/257 is (256^23029 + 1)/257 found by Donovan Johnson 03/2005. The only currently known prime of the form (2^n + 1)/65537 is (65536^239 + 1)/65537.
From Giuseppe Coppoletta, May 18 2017: (Start)
In general, for any j > 1, if (2^(n*2^j) + 1)/Fj is a prime (where Fj = 2^2^j + 1 is the corresponding Fermat number), then n needs to be prime, as for any odd proper factor q of n, 2^(q*2^j) + 1 is another factor of the numerator. The same for j = 0, apart for the particular value n = 3^2.
For the case j = 4, I checked it again, and (65536^p + 1)/65537 indeed is not a prime at least for 239 < p < 12500, i.e. (2^n + 1)/65537 is not a prime at least up to n = 200000. Any higher upper bound available?
One can also remark that 65536 = 2^16 and 239 = 2^8 - 2^4 - 1. Is there any special reason (see Brennen's link) for that?
I checked also that (2^(p*2^j) + 1)/Fj is never a proper power (in particular it is not a prime power) for j = 0..4 and for any prime p, at least for any exponent p*2^j < 200000.
We can even conjecture that ((Fj-1)^p + 1)/Fj is always squarefree for any odd prime p and for any Fermat number Fj with j >= 0. Note that this is not true if p is not restricted to be a prime, even if p and Fj are coprime, as shown by the following counterexample relative to the case j = 1, f1 = 5: 4^91 + 1 == 0 mod 1093^2. Remark that any such counterexample has to be a Wieferich prime (A001220), but not every Wieferich prime gives a counterexample, as shown by the second known Wieferich prime (3511), which cannot match here because it belongs to A072936.
(End)

Crossrefs

Cf. A000978 = numbers n such that (2^n + 1)/3 is prime. Cf. A057182 = numbers n such that (16^n + 1)/17 is a prime.

Programs

  • Mathematica
    Do[n=8*Prime[k];f=2^n+1;If[PrimeQ[f/257],Print[{n,n/8}]],{k,1,2570}]

A102029 Smallest semiprime with Hamming weight n (i.e., smallest semiprime with exactly n ones when written in binary), or -1 if no such number exists.

Original entry on oeis.org

4, 6, 14, 15, 55, 95, 247, 447, 511, 1535, 2047, 7167, 12287, 32255, 49151, 98303, 196607, 393215, 983039, 1572863, 3145727, 6291455, 8388607, 33423359, 50331647, 117440511, 201326591, 528482303, 805306367, 1879048191, 3221225471
Offset: 1

Views

Author

Jonathan Vos Post, Jun 23 2007

Keywords

Comments

Semiprime analog of A061712. Extended by Stefan Steinerberger. Includes the subset Mersenne semiprimes A092561.

Examples

			a(1) = 4 because the first semiprime A001358(1) is 4 (base 10) which is written 100 in binary, the latter representation having exactly 1 one.
a(2) = 6 since A001358(2) = 6 = 110 (base 2) has exactly 2 ones.
a(4) = 15 since A001358(6) = 15 = 1111 (base 2) has exactly 4 ones and, as it also has no zeros, is the smallest of the Mersenne semiprimes.
		

Crossrefs

Programs

  • Mathematica
    Join[{4},Table[SelectFirst[Sort[FromDigits[#,2]&/@Permutations[ Join[ PadRight[{}, n,1],{0}]]],PrimeOmega[#]==2&],{n,2,40}]] (* Harvey P. Dale, Feb 06 2015 *)

A278242 Least number with the prime signature of 2^n + 1.

Original entry on oeis.org

2, 2, 2, 4, 2, 6, 6, 6, 2, 24, 12, 6, 6, 6, 30, 60, 2, 6, 210, 6, 6, 60, 30, 6, 30, 210, 210, 240, 6, 30, 4620, 6, 6, 420, 210, 2310, 210, 30, 210, 60, 6, 30, 30030, 6, 30, 9240, 2310, 30, 30, 30, 9240, 4620, 30, 30, 30030, 4620, 30, 420, 30, 210, 210, 6, 2310, 9240, 6, 30030, 30030, 30, 60, 420, 60060, 30, 2310, 30, 2310, 60060, 210, 30030, 446185740, 6, 30
Offset: 0

Views

Author

Antti Karttunen, Nov 19 2016

Keywords

Crossrefs

Cf. A073936 (positions of 6's), A092559 (positions of 4's and 6's).
Cf. also A278240.

Programs

  • Mathematica
    Table[Times @@ MapIndexed[(Prime@ First@ #2)^#1 &, #] &@ If[Length@ # == 1 && #[[1, 1]] == 1, {0}, Reverse@ Sort@ #[[All, -1]]] &@ FactorInteger[ 2^n + 1], {n, 0, 80}] (* Michael De Vlieger, Nov 21 2016 *)
  • PARI
    A046523(n) = my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]) \\ from Charles R Greathouse IV, Aug 17 2011
    A278242(n) = A046523((2^n)+1);
    for(n=0, 257, write("b278242.txt", n, " ", A278242(n)));
    
  • Scheme
    (define (A278242 n) (A046523 (A000051 n)))

Formula

a(n) = A046523(A000051(n)).

A283657 Numbers m such that 2^m + 1 has at most 2 distinct prime factors.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17, 19, 20, 23, 28, 31, 32, 40, 43, 61, 64, 79, 92, 101, 104, 127, 128, 148, 167, 191, 199, 256, 313, 347, 356, 596, 692, 701, 1004, 1228, 1268, 1709, 2617, 3539, 3824, 5807, 10501, 10691, 11279, 12391, 14479
Offset: 1

Views

Author

Vladimir Shevelev, Mar 13 2017

Keywords

Comments

Using comment in A283364, note that if a(n) is odd > 9, then it is prime.
503 <= a(41) <= 596. - Robert Israel, Mar 13 2017
Could (4^p + 1)/5^t be prime, where p is prime, 5^t is the highest power of 5 dividing 4^p + 1, other than for p=2, 3 and 5? - Vladimir Shevelev, Mar 14 2017
In his message to seqfans from Mar 15 2017, Jack Brennen beautifully proved that there are no more primes of such form. From his proof one can see also that there are no terms of the form 2*p > 10 in the sequence. - Vladimir Shevelev, Mar 15 2017
Where A046799(n)=2. - Robert G. Wilson v, Mar 15 2017
From Giuseppe Coppoletta, May 16 2017: (Start)
The only terms that are not in A066263 are those m giving 2^m + 1 = prime (i.e. m = 0 and any number m such that 2^m + 1 is a Fermat prime) and the values of m giving 2^m + 1 = power of a prime, giving m = 3 as the only possible case (by Mihăilescu-Catalan's result, see links).
For the relation with Fermat numbers and for other possible terms to check, see comments in A073936 and A066263.
All terms after a(59) refer to probabilistic primality tests for 2^a(n) + 1 (see Caldwell's link for the list of the largest certified Wagstaff primes).
After a(65), the values 267017, 269987, 374321, 986191, 4031399 and 4101572 are also terms, but there still remains the remote possibility of some gaps in between. In addition, 13347311 and 13372531 are also terms, but possibly much further along in the numbering (see comments in A000978).
(End).

Examples

			0 is a term as 2^0 + 1 = 2 is a prime.
10 is a term as 2^10 + 1 = 5^2 * 41.
14 is not a term as 2^14 + 1 = 5 * 29 * 113.
		

Crossrefs

Programs

  • Maple
    # this uses A002587[i] for i<=500, e.g., from the b-file for that sequence
    count:= 0:
    for i from 0 to 500 do
      m:= 0;
      r:= (2^i+1);
      if i::odd then
        m:= 1;
        r:= r/3^padic:-ordp(r,3);
      elif i > 2 then
        q:= max(numtheory:-factorset(i));
        if q > 2 then
          m:= 1;
          r:= r/B[i/q]^padic:-ordp(r,A002587[i/q]);
        fi
      fi;
      if r mod B[i] = 0 then m:= m+1;
          j:= padic:-ordp(r, A002587[i]);
          r:= r/B[i]^j;
      fi;
      mmax:= m;
      if isprime(r) then m:= m+1; mmax:= m
      elif r > 1 then mmax:= m+2
      fi;
      if mmax <= 2 or (m <= 1 and m + nops(numtheory:-factorset(r)) <= 2) then
           count:= count+1;
         A[count]:= i;
      fi
    od:
    seq(A[i],i=1..count); # Robert Israel, Mar 13 2017
  • Mathematica
    Select[Range[0, 313], PrimeNu[2^# + 1]<3 &] (* Indranil Ghosh, Mar 13 2017 *)
  • PARI
    for(n=0, 313, if(omega(2^n + 1)<3, print1(n,", "))) \\ Indranil Ghosh, Mar 13 2017

Extensions

a(16)-a(38) from Peter J. C. Moses, Mar 13 2017
a(39)-a(40) from Robert Israel, Mar 13 2017
a(41)-a(65) from Giuseppe Coppoletta, May 08 2017
Showing 1-10 of 17 results. Next