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.

Previous Showing 51-60 of 125 results. Next

A235709 Least prime p < prime(n) with 2^p - 1 a quadratic residue modulo prime(n), or 0 if such a number does not exist.

Original entry on oeis.org

0, 0, 0, 0, 2, 2, 7, 3, 2, 3, 3, 2, 5, 5, 2, 3, 2, 2, 7, 2, 2, 5, 2, 23, 2, 5, 3, 2, 2, 3, 5, 2, 3, 3, 3, 5, 2, 11, 2, 5, 2, 2, 2, 2, 3, 3, 11, 3, 2, 2, 3, 2, 2, 2, 5, 2, 7, 3, 2, 3, 3, 5, 3, 2, 2, 3, 5, 2, 2, 2, 7, 2, 3, 2, 7, 2, 3, 2, 3, 2, 2, 2, 2, 2, 3, 2, 3, 2, 11, 5, 2, 2, 5, 2, 5, 2, 7, 5, 3, 2
Offset: 1

Views

Author

Zhi-Wei Sun, Apr 20 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 4.
We have verified this for all n = 5, ..., 10^8.
Note that the conjecture in A234972 implies that for any prime p > 3 there is a prime q < p with 2^q - 1 a quadratic nonresidue modulo p.

Examples

			a(8) = 3 since 2^3 - 1 = 7 is a quadratic residue modulo prime(8) = 19, but 2^2 - 1 = 3 is not.
		

Crossrefs

Programs

  • Mathematica
    Do[Do[If[JacobiSymbol[2^(Prime[k])-1,Prime[n]]==1,Print[n," ",Prime[k]];Goto[aa]],{k,1,n-1}];Print[n," ",0];Label[aa];Continue,{n,1,100}]

A241573 2^p + 3 where p is prime.

Original entry on oeis.org

7, 11, 35, 131, 2051, 8195, 131075, 524291, 8388611, 536870915, 2147483651, 137438953475, 2199023255555, 8796093022211, 140737488355331, 9007199254740995, 576460752303423491, 2305843009213693955, 147573952589676412931, 2361183241434822606851
Offset: 1

Views

Author

Vincenzo Librandi, Apr 29 2014

Keywords

Crossrefs

Cf. sequences of the form 2^p+k with p prime: A034785 (k=0), A001348 (k=-1), A098640 (k=1), A241676 (k=-3), this sequence (k=3), A241678 (k=-5), A241677 (k=5), A098815 (k=-7), A241679 (k=7), A098231 (k=-11), A241680 (k=11).

Programs

  • Magma
    [2^p+3: p in PrimesUpTo(100)];
    
  • Mathematica
    Table[2^Prime[n] + 3, {n, 20}]
  • Sage
    [2^p+3 for p in primes(100)] # Bruno Berselli, Apr 29 2014

A135979 Indices n such that 2^prime(n)-1 has exactly 2 distinct prime factors.

Original entry on oeis.org

5, 9, 12, 13, 17, 19, 23, 25, 26, 27, 29, 32, 33, 34, 35, 39, 45, 46, 49, 53, 57, 58, 60, 62, 69, 74, 75, 82, 88, 93, 99, 129, 140, 152, 164, 166, 168, 178, 179
Offset: 1

Views

Author

Artur Jasinski, Dec 09 2007

Keywords

Comments

a(40)>=206. - Amiram Eldar, Sep 29 2018

Crossrefs

Programs

  • Mathematica
    k = {}; Do[If[ ! PrimeQ[2^Prime[n] - 1], c = FactorInteger[2^Prime[n] - 1]; d = Length[c]; If[d == 2, AppendTo[k, n]]], {n, 1, 40}]; k
    Select[Range[40],PrimeNu[2^Prime[#]-1]==2&] (* Harvey P. Dale, Jul 07 2013 *)

Formula

Equals {k: A001221(A001348(k)) = 2}. a(n) = A049084(A135978(n)). - R. J. Mathar, May 03 2008

Extensions

Edited by R. J. Mathar, May 03 2008
a(17)-a(34) from Donovan Johnson, Jun 14 2009
a(35)-a(39) from Amiram Eldar, Sep 29 2018

A188133 Primes p such that 10p+1 divides 2^p-1.

Original entry on oeis.org

43, 487, 547, 571, 883, 1459, 1663, 1723, 2539, 3319, 3511, 4903, 5107, 5431, 6199, 6367, 8011, 8599, 9007, 9391, 9511, 10111, 11119, 11959, 12379, 12703, 13291, 13339, 13999, 14083, 14551, 14767, 15187, 15319, 15859, 15991, 16183, 16603, 16747, 17659, 18427, 19699
Offset: 1

Views

Author

M. F. Hasler, Mar 21 2011

Keywords

Comments

It is known that divisors of M(p)=2^p-1 are of the form 2kp+1. For k=1, these are the Lucasian primes A002515, for k=2 there are no such divisors, for k=3 these divisors are listed in A188130 and for k=4 in A122095.
The equivalent sequence of prime indices is 14, 93, 101, 105, 153, 232, 261, 269, ....
If k == 2 (mod 4), there are no such divisors in general and here there are no smaller k's than k = 5. - Karl-Heinz Hofmann, Jan 27 2022

Crossrefs

Cf. A002515 (k = 1), A188130 (k = 3), A122095 (k = 4), A350702 (k = 7).

Programs

  • Mathematica
    Select[Range[2*10^4], PrimeQ[#] && PowerMod[2, #, 10# + 1] == 1 &] (* Amiram Eldar, Nov 13 2019 *)
    Select[Prime[Range[2500]],PowerMod[2,#,10#+1]==1&] (* Harvey P. Dale, Dec 08 2024 *)
  • PARI
    forprime(p=1,1e5, Mod(2,p*10+1)^p-1 || print1(p", "))
    
  • Python
    from sympy import sieve
    print([p for p in sieve[1:10000] if pow(2,p,10*p+1) == 1])
    # Karl-Heinz Hofmann, Jan 27 2022

Formula

{p = A000040(i): 10*p+1 | A001348(i)}. - R. J. Mathar, Mar 21 2011

A300332 Integers of the form Sum_{j in 0:p-1} x^j*y^(p-j-1) where x and y are positive integers with max(x, y) >= 2 and p is some prime.

Original entry on oeis.org

3, 4, 7, 12, 13, 19, 21, 27, 28, 31, 37, 39, 43, 48, 49, 52, 57, 61, 63, 67, 73, 75, 76, 79, 80, 84, 91, 93, 97, 103, 108, 109, 111, 112, 117, 121, 124, 127, 129, 133, 139, 147, 148, 151, 156, 157, 163, 169, 171, 172, 175, 181, 183, 189, 192, 193, 196, 199
Offset: 1

Views

Author

Peter Luschny, Mar 03 2018

Keywords

Comments

Equivalently these are the integers represented by a cyclotomic binary form Phi_p(x,y) where p is prime and x and y are positive integers with max(x,y) >= 2. A cyclotomic binary form (over Z) is a homogeneous polynomial in two variables of the form f(x, y) = y^phi(k)*Phi(k, x/y) where Phi(k, z) is a cyclotomic polynomial of index k and phi is Euler's totient function.
An efficient and safe calculation of this sequence requires a precise knowledge of the range of possible solutions of the associated Diophantine equations. The bounds used in the Julia program below were specified by Fouvry, Levesque and Waldschmidt.

Examples

			Let p denote an odd prime. Subsequences are numbers of the form
2^p - 1,         (A001348) (x = 1, y = 2) (Mersenne numbers),
p*2^(p - 1),     (A299795) (x = 2, y = 2),
(3^p - 1)/2,     (A003462) (x = 1, y = 3),
3^p - 2^p,       (A135171) (x = 2, y = 3),
p*3^(p - 1),     (A027471) (x = 3, y = 3),
(4^p - 1)/3,     (A002450) (x = 1, y = 4),
2^(p-1)*(2^p-1), (A006516) (x = 2, y = 4),
4^p - 3^p,       (A005061) (x = 3, y = 4),
p*4^(p - 1),     (A002697) (x = 4, y = 4),
(p^p-1)/(p-1),   (A023037),
p^p,             (A000312, A051674).
.
The generalized cuban primes A007645 are a subsequence, as are the quintan primes A002649, the septan primes and so on.
All primes in this sequence less than 1031 are generalized cuban primes. 1031 is an element because 1031 = f(5,2) where f(x,y) = x^4 + y*x^3 + y^2*x^2 + y^3*x + y^4, however 1031 is not a cuban prime because 1030 is not divisible by 6.
		

Crossrefs

Programs

  • Julia
    using Primes
    function isA300332(n)
        logn = log(n)^1.161
        K = Int(floor(5.383*logn))
        M = Int(floor(2*(n/3)^(1/2)))
        k = 2
        while k <= K
            if k == 7
                K = Int(floor(4.864*logn))
                M = Int(ceil(2*(n/11)^(1/4)))
            end
            for y in 2:M, x in 1:y
                r = x == y ? k*y^(k - 1) : div(x^k - y^k, x - y)
                n == r && return true
            end
            k = nextprime(k+1)
        end
        return false
    end
    A300332list(upto) = [n for n in 1:upto if isA300332(n)]
    println(A300332list(200))

A066538 Sum of the digits of the n-th Mersenne prime (A000668).

Original entry on oeis.org

3, 7, 4, 10, 19, 13, 28, 46, 73, 112, 139, 154, 697, 847, 1675, 3106, 3106, 4258, 5755, 5950, 13216, 13693, 14980, 27202, 28939, 31339, 60337, 116455, 149365, 179488, 291745, 1026544, 1163443, 1704376, 1893388, 4038358, 4092673, 9440671, 18243946, 28445131, 32580433, 35170384, 41201947, 44142151, 50349694, 57766339, 58416637
Offset: 1

Views

Author

Robert G. Wilson v, Jan 06 2002

Keywords

Comments

From Gord Palameta, Jul 21 2018: (Start)
a(38) and a(39) were calculated by Enoch Haga, Sep 07 1999 and Dec 17 2001; a(40) through a(42) were calculated by Andrew Rupinski, Mar 12 2005. (See the Carlos Rivera link.)
It appears that asymptotically a(n)/A000043(n) = 9*log_10(2)/2. (End)

Crossrefs

Subsequence of: A007953, A007605.
Cf. A001370 (sum of digits of 2^n).

Programs

  • Mathematica
    ep = {the exponents from A000043}; a = {}; Do[ a = Append[a, Apply[ Plus, IntegerDigits[ 2^ep[[n]] - 1]]], {n, 1, 47} ]; a
    (* Second program: *)
    Array[Total@ IntegerDigits[2^MersennePrimeExponent@ # - 1] &, 45] (* Michael De Vlieger, Jul 22 2018 *)

Formula

a(n) = A007953(A000668(n)). - Amiram Eldar, Oct 16 2024

Extensions

Definition corrected by Omar E. Pol, Apr 01 2008
a(38)-a(47) from Gord Palameta, Jul 21 2018

A081093 a(n) is the smallest prime such that the number of 1's in its binary expansion is equal to the n-th prime.

Original entry on oeis.org

3, 7, 31, 127, 3583, 8191, 131071, 524287, 14680063, 1073479679, 2147483647, 266287972351, 4260607557631, 17591112302591, 246290604621823, 17996806323437567, 1152917106560335871, 2305843009213693951
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 05 2003

Keywords

Comments

a(n) = Min{p: A000120(p)=A000040(n), p prime}.
If 2^(Prime[n]) - 1 is a prime number, then a(n) = 2^(Prime[n]) - 1, where Prime[n] denotes the n-th prime number. This means that every Mersenne prime arises in this sequence. - Stefan Steinerberger, Jan 22 2006
For all n with prime(n) < 300, a(n) has either prime(n) or prime(n)+1 bits. - David Wasserman, Oct 25 2006

Examples

			n=4, p[4]=11, 3583=[11011111111] has 11 digits=1 and is prime;
2047=23.89=[11111111111] is not here because it is composite.
a(5)=3583=A081092(266)=A000040(502) having eleven 1's: '110111111111' and A000120(p)<11=prime(5) for primes p<3583.
Mersenne-primes are here, Mersenne composites not.
		

Crossrefs

Programs

  • Mathematica
    Do[k=1;While[Count[IntegerDigits[Prime[k], 2], 1] !=Prime[n], k++ ];Print[Prime[k]], {n, 1, 10}]

Formula

a(n) = A061712(A000040(n)). - Franklin T. Adams-Watters, Jun 06 2006

Extensions

More terms from Franklin T. Adams-Watters, Jun 06 2006
Further terms from David Wasserman, Oct 25 2006
Edited by N. J. A. Sloane, Sep 15 2008 at the suggestion of R. J. Mathar

A089158 Second prime factor, if it exists, of Mersenne numbers.

Original entry on oeis.org

89, 178481, 1103, 616318177, 164511353, 9719, 4513, 69431, 3203431780337, 761838257287, 48544121, 2298041, 202029703, 57912614113275649087721, 13842607235828485645766393, 341117531003194129, 3976656429941438590393
Offset: 1

Views

Author

Cino Hilliard, Dec 06 2003

Keywords

Examples

			The 5th Mersenne number 2^11 - 1 = 23*89 and 89 is the second prime divisor.
The 9th Mersenne number 2^23 - 1 = 47*178481 and 178481 is the second prime divisor.
Notice 23, 89 congruent to 1 mod 11 and 47, 178481 congruent to 1 mod 23.
		

Crossrefs

Programs

  • PARI
    mersenne(b,n,d) = { c=0; forprime(x=2,n, c++; y = b^x-1; f=factor(y); v=component(f,1); ln = length(v); if(ln>=d,print1(v[d]",")); ) }

A089162 Triangle read by rows formed by the prime factors of Mersenne number 2^prime(n) - 1, n >= 1.

Original entry on oeis.org

3, 7, 31, 127, 23, 89, 8191, 131071, 524287, 47, 178481, 233, 1103, 2089, 2147483647, 223, 616318177, 13367, 164511353, 431, 9719, 2099863, 2351, 4513, 13264529, 6361, 69431, 20394401, 179951, 3203431780337, 2305843009213693951, 193707721, 761838257287
Offset: 1

Views

Author

Cino Hilliard, Dec 06 2003

Keywords

Comments

All factors of Mersenne numbers 2^p - 1, where p is prime, are == 1 (mod p). See the first Caldwell link for a proof of the statement that if q divides M_p = 2^p-1 then q = 2kp + 1 for some integer k. - Comment corrected by Jonathan Sondow, Dec 29 2016

Examples

			The 16th Mersenne number 2^53-1 has the three prime factors 6361, 69431, 20394401.
See tail end of second row in the sequence. Each factor is == 1 (mod 53).
Triangle begins:
  3;
  7;
  31;
  127;
  23, 89;
  8191;
  131071;
  524287;
  47, 178481;
  233, 1103, 2089;
  2147483647;
  223, 616318177;
  13367, 164511353;
  431, 9719, 2099863;
  2351, 4513, 13264529;
  6361, 69431, 20394401;
		

Crossrefs

Cf. A122094 (sorted version of this list).

Programs

  • Mathematica
    row[n_]:=First/@FactorInteger[2^Prime[n]-1]; Array[row,19]//Flatten (* Stefano Spezia, May 03 2024 *)
  • PARI
    mersenne(b,n,d) = { c=0; forprime(x=2,n, c++; y = b^x-1; f=factor(y); v=component(f,1); ln = length(v); if(ln>=d,print1(v[d]",")); ) }

Extensions

Definition corrected by Max Alekseyev, Jul 25 2023

A100105 a(n) = 2^prime(n)-prime(n).

Original entry on oeis.org

2, 5, 27, 121, 2037, 8179, 131055, 524269, 8388585, 536870883, 2147483617, 137438953435, 2199023255511, 8796093022165, 140737488355281, 9007199254740939, 576460752303423429, 2305843009213693891
Offset: 1

Views

Author

Jorge Coveiro, Dec 26 2004

Keywords

Crossrefs

Programs

Previous Showing 51-60 of 125 results. Next