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 10 results.

A005109 Class 1- (or Pierpont) primes: primes of the form 2^t*3^u + 1.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 19, 37, 73, 97, 109, 163, 193, 257, 433, 487, 577, 769, 1153, 1297, 1459, 2593, 2917, 3457, 3889, 10369, 12289, 17497, 18433, 39367, 52489, 65537, 139969, 147457, 209953, 331777, 472393, 629857, 746497, 786433, 839809, 995329, 1179649, 1492993, 1769473, 1990657
Offset: 1

Views

Author

Keywords

Comments

The definition is given by Guy: a prime p is in class 1- if the only prime divisors of p - 1 are 2 or 3; and p is in class r- if every prime factor of p - 1 is in some class <= r- - 1, with equality for at least one prime factor. - N. J. A. Sloane, Sep 22 2012
See A005105 for the definition of class r+ primes.
Gleason, p. 191: a regular polygon of n sides can be constructed by ruler, compass and angle-trisector iff n = 2^r * 3^s * p_1 * p_2 * ... * p_k, where p_1, p_2, ..., p_k are distinct elements of this sequence and > 3.
Sequence gives primes solutions to p == +1 (mod phi(p-1)). - Benoit Cloitre, Feb 22 2002
These are the primes p for which p-1 is 3-smooth. Primes for which either p+1 or p-1 have many small factors are more easily proved prime, so most of the largest primes found have this property. - Michael B. Porter, Feb 19 2013
For terms p > 3, omega(p-1) = 3 - p mod 3. Consider terms > 3. Clearly, t > 0. If p == 1 mod 3, u > 0: hence omega(p-1) = 2 because p-1 has two prime factors. If p == 2 mod 3, u = 0: hence omega(p-1) = 1 because p-1 is a power of 2. The latter case corresponds to terms that are Fermat primes > 3. Similar arguments demonstrate the converse, that for p > 3, if omega(p-1) = 3 - p mod 3, p is a term. - Chris Boyd, Mar 22 2014
The subset of A055600 which are prime. - Robert G. Wilson v, Jul 19 2014
Named after the American mathematician James Pierpont (1866-1938). - Amiram Eldar, Jun 09 2021

Examples

			97 = 2^5*3 + 1 is a term.
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, section A18, p. 66.
  • George E. Martin, Geometric Constructions, Springer, 1998. ISBN 0-387-98276-0.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • GAP
    K:=10^7;; # to get all terms <= K.
    A:=Filtered([1..K],IsPrime);;
    B:=List(A,i->Factors(i-1));;
    C:=[];;  for i in B do if Elements(i)=[2] or Elements(i)=[2,3]  then Add(C,Position(B,i)); fi; od;
    A005109:=Concatenation([2],List(C,i->A[i])); # Muniru A Asiru, Sep 10 2017
    
  • Magma
    [p: p in PrimesUpTo(10^8) | forall{d: d in PrimeDivisors(p-1) | d le 3}]; // Bruno Berselli, Sep 24 2012
    
  • Mathematica
    PrimeFactors[n_Integer] := Flatten[ Table[ #[[1]], {1}] & /@ FactorInteger[n]]; f[n_Integer] := Block[{m = n}, If[m == 0, m = 1, While[ IntegerQ[m/2], m /= 2]; While[ IntegerQ[m/3], m /= 3]]; Apply[Times, PrimeFactors[m] - 1]]; ClassMinusNbr[n_] := Length[NestWhileList[f, n, UnsameQ, All]] - 3; Prime[ Select[ Range[3, 6300], ClassMinusNbr[ Prime[ # ]] == 1 &]]
    Select[Prime /@ Range[10^5], Max @@ First /@ FactorInteger[ # - 1] < 5 &] (* Ray Chandler, Nov 01 2005 *)
    mx = 2*10^6; Select[Sort@ Flatten@ Table[2^i*3^j + 1, {i, 0, Log[2, mx]}, {j, 0, Log[3, mx/2^i]}], PrimeQ] (* Robert G. Wilson v, Jul 16 2014, edited by Michael De Vlieger, Aug 23 2017 *)
  • PARI
    N=10^8; default(primelimit,N);
    pq(p)={p-=1; (p/(2^valuation(p,2)*3^valuation(p,3)))==1;}
    forprime(p=2,N,if(pq(p),print1(p,", ")));
    /* Joerg Arndt, Sep 22 2012 */
    
  • PARI
    /* much more efficient: */
    A005109_upto(lim=1e10)={my(L=List(), k2=1);
    until ( lim <= k2 *= 2, my(k23 = k2);
        until ( lim <= k23 *= 3, isprime(k23+1) && listput(L, k23+1));
    ); Set(L) } /* Joerg Arndt, Sep 22 2012, edited by M. F. Hasler, Mar 17 2024 */
    
  • PARI
    N=10^8; default(primelimit, N);
    print1("2, 3, ");forprime(p=5,N,if(omega(p-1)==3-p%3,print1(p", "))) \\ Chris Boyd, Mar 22 2014
    
  • Python
    from itertools import islice
    from sympy import nextprime
    def A005109_gen(): # generator of terms
        p = 2
        while True:
            q = p-1
            q >>= (~q&q-1).bit_length()
            a, b = divmod(q,3)
            while not b:
                a, b = divmod(q:=a,3)
            if q==1:
                yield p
            p = nextprime(p)
    A005109_list = list(islice(A005109_gen(),30)) # Chai Wah Wu, Mar 17 2023

Formula

A122257(a(n)) = 1; A122258(n) = number of Pierpont primes <= n; A122260 gives numbers having only Pierpont primes as factors. - Reinhard Zumkeller, Aug 29 2006
{primes p: A126805(PrimePi(p)) = 1}. - R. J. Mathar, Sep 24 2012
a(n) = 2^A374577(n) * 3^A374578(n) + 1. - Amiram Eldar, Sep 02 2024

Extensions

Comments and additional references from Antreas P. Hatzipolakis (xpolakis(AT)otenet.gr)
More terms from David W. Wilson
More terms from Benoit Cloitre, Feb 22 2002
More terms from Robert G. Wilson v, Mar 20 2003

A077313 Primes of the form 2^r*5^s - 1.

Original entry on oeis.org

3, 7, 19, 31, 79, 127, 199, 499, 1249, 1279, 1999, 4999, 5119, 8191, 12799, 20479, 31249, 49999, 51199, 79999, 81919, 131071, 199999, 524287, 799999, 1249999, 1310719, 3124999, 3276799, 4999999, 7812499, 12499999, 19999999, 20479999
Offset: 1

Views

Author

Amarnath Murthy, Nov 04 2002

Keywords

Comments

Primes p such that 10^p is divisible by p+1. Primes p whose fractions p/(p+1) are terminating decimals, i.e., primes p such that A158911(p)=0. Primes p such that the prime divisors of p+1 are also prime divisors of the numbers m obtained by the concatenation of p and p+1. For example, for p=19, m = 1920, the prime divisors of 20 are {2, 5} and the prime divisors of 1920 are {2, 3, 5}. - Jaroslav Krizek, Feb 25 2013
For n > 1, all terms are congruent to 1 (mod 6). - Muniru A Asiru, Sep 29 2017

Examples

			1250000 = 2*2*2*2*5*5*5*5*5*5*5 and 1250000 - 1 = A000040(96469), therefore 1249999 is a term.
List of (r, s): (2, 0), (3, 0), (2, 1), (5, 0), (4, 1), (7, 0), (3, 2), (2, 3), (1, 4), (8, 1), (4, 3), (3, 4), (10, 1), ...  - _Muniru A Asiru_, Sep 29 2017
		

Crossrefs

Programs

  • GAP
    A:=Filtered([1..10^7],IsPrime);;    I:=[5];;
    B:=List(A,i->Elements(Factors(i+1)));;
    C:=List([0..Length(I)],j->List(Combinations(I,j),i->Concatenation([2],i)));;
    A077313:=List(Set(Flat(List([1..Length(C)],i->List([1..Length(C[i])],j->Positions(B,C[i][j]))))),i->A[i]); # Muniru A Asiru, Sep 29 2017
  • Mathematica
    With[{n = 10^8}, Union@ Select[Flatten@ Table[2^p*5^q - 1, {p, 0, Log[2, n/(1)]}, {q, 0, Log[5, n/(2^p)]}], PrimeQ]] (* Michael De Vlieger, Sep 30 2017 *)

Extensions

More terms from Reinhard Zumkeller, Nov 15 2002
More terms from Vladeta Jovovic, May 08 2003

A077498 Primes of the form 2^r*7^s + 1.

Original entry on oeis.org

2, 3, 5, 17, 29, 113, 197, 257, 449, 1373, 3137, 50177, 65537, 114689, 268913, 470597, 614657, 1075649, 3294173, 7340033, 9834497, 210827009, 275365889, 359661569, 469762049, 1129900997, 1438646273, 1927561217, 7909306973, 52613349377
Offset: 1

Views

Author

Amarnath Murthy, Nov 07 2002

Keywords

Examples

			197 = 2^2*7^2 + 1 is a member.
		

Crossrefs

Extensions

Corrected and extended by Ray Chandler, Aug 02 2003

A077500 Primes of the form 2^r*p^s + 1, where p is an odd prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 37, 41, 47, 53, 59, 73, 83, 89, 97, 101, 107, 109, 113, 137, 149, 163, 167, 173, 179, 193, 197, 227, 233, 251, 257, 263, 269, 293, 317, 347, 353, 359, 383, 389, 401, 433, 449, 467, 479, 487, 503, 509, 557, 563, 569, 577, 587
Offset: 1

Views

Author

Amarnath Murthy, Nov 07 2002

Keywords

Comments

Primes p such that p-1 has at most one odd prime divisor.

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[110]],Length[Select[FactorInteger[#-1] [[All, 1]], OddQ]]<2&] (* Harvey P. Dale, Oct 09 2017 *)

Extensions

Corrected and extended by Sascha Kurz, Jan 04 2003

A002200 Primes of the form 2^q*3^r*5^s + 1.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 31, 37, 41, 61, 73, 97, 101, 109, 151, 163, 181, 193, 241, 251, 257, 271, 401, 433, 487, 541, 577, 601, 641, 751, 769, 811, 1153, 1201, 1297, 1459, 1601, 1621, 1801, 2161, 2251, 2593, 2917, 3001, 3457, 3889, 4001, 4051, 4801, 4861
Offset: 1

Views

Author

Keywords

References

  • M. Kraitchik, Recherches sur la Théorie des Nombres. Gauthiers-Villars, Paris, Vol. 1, 1924, Vol. 2, 1929, see Vol. 1, p. 53.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • GAP
    K:=10^7;; # to get all terms <= K.
    A:=Filtered([1..K],IsPrime);;
    B:=List(A,i->Factors(i-1));;
    C:=[];;  for i in B do if Elements(i)=[2] or Elements(i)=[2,3]  or Elements(i)=[2,5] or Elements(i)=[2,3,5]  then Add(C,Position(B,i)); fi; od;
    A002200:=Concatenation([2],List(C,i->A[i])); # Muniru A Asiru, Sep 10 2017
  • Magma
    [p: p in PrimesUpTo(5000) | forall{d: d in PrimeDivisors(p-1) | d le 5}]; // Bruno Berselli, Sep 24 2012
    
  • Mathematica
    up=10^6; a=1; Sort[Reap[While[ aGiovanni Resta, Jul 18 2017 *)
  • PARI
    { default(primelimit, 16600000); n=0; forprime (p=2, 16600000, m=p-1; p2=p3=p5=0; s=m; r=0; while(r==0, q=s\2; r=s-2*q; s=q; if(r==0, p2++)); s=m; r=0; while(r==0, q=s\3; r=s-3*q; s=q; if(r==0, p3++)); s=m; r=0; while(r==0, q=s\5; r=s-5*q; s=q; if(r==0, p5++)); if (m == 2^p2*3^p3*5^p5, n++; write("b002200.txt", n, " ", p)); if (n >= 200, break); ); } \\ Harry J. Smith, May 25 2009
    
  • PARI
    { n=5000; cache=10^5; v=vector(cache); x2=2; x3=3; x5=5; i=j=k=1; v[1]=1; for(m=2,cache,v[m]=t=min(x2,min(x3,x5)); if(x2==t,x2=2*v[i++]); if(x3==t,x3=3*v[j++]); if(x5==t,x5=5*v[k++]);); i=0; c=0; while(cJean-Marie Madiot, Jul 17 2017
    

Extensions

Better description and more terms from Vladeta Jovovic, May 08 2003

A077499 Primes of the form 2^r*11^s + 1.

Original entry on oeis.org

2, 3, 5, 17, 23, 89, 257, 353, 1409, 2663, 30977, 65537, 170369, 495617, 5767169, 23068673, 59969537, 82458113, 453519617, 3429742097, 4715895383, 15352201217, 39909726209, 1857616347137, 45732811767809, 96757023244289
Offset: 1

Views

Author

Amarnath Murthy, Nov 07 2002

Keywords

Comments

Primes p such that p-1 has at most one odd prime divisor 11.

Crossrefs

Extensions

More terms from Ray Chandler, Aug 02 2003

A178070 Primes dividing repunits R(10^n) for some n.

Original entry on oeis.org

11, 17, 41, 73, 101, 137, 251, 257, 271, 353, 401, 449, 641, 751, 1201, 1409, 1601, 3541, 4001, 4801, 5051, 9091, 10753, 15361, 16001, 19841, 21001, 21401, 24001, 25601, 27961, 37501, 40961, 43201, 60101, 62501, 65537, 69857, 76001, 76801, 160001, 162251, 163841, 307201, 453377, 524801, 544001, 670001, 952001, 976193, 980801
Offset: 1

Views

Author

Shashank Sharma, May 19 2010, Aug 04 2010

Keywords

Comments

Repunits are the numbers consisting entirely of 1's. The number represented by R(10^n) contains 10^n digits with all 1's. E.g., R(10^1) = 1111111111.
A prime p > 5 is here if the multiplicative order of 10 (mod p) is of the form 2^i*5^j, with i and j nonnegative.
Includes all terms > 5 of A077497. - Robert Israel, Nov 05 2024

Examples

			17 divides R(10^4), so is in the sequence. - _Phil Carmody_, May 26 2011
Note that R(10^n) == 1 mod 3 for all n, so 3 is not a member. - _N. J. A. Sloane_, Jun 18 2014
		

Crossrefs

Programs

  • Maple
    filter:= proc(p) local v;
      if not isprime(p) then return false fi;
      v:= numtheory:-order(10,p);
      v = 2^padic:-ordp(v,2) * 5^padic:-ordp(v,5)
    end proc:
    select(filter, [seq(i, i=7 .. 10^6, 2)]); # Robert Israel, Nov 05 2024
  • Mathematica
    Select[Prime[Range[4, 100000]], Complement[First /@ FactorInteger[MultiplicativeOrder[10, #]], {2, 5}] == {} &] (* T. D. Noe, May 26 2011 *)
  • PARI
    g=10^30;forprime(p=7,1000000,z=znorder(Mod(10,p));if(gcd(z,g)==z,print1(p", "))) \\ Phil Carmody, May 26 2011
    
  • PARI
    upTo(lim)=my(v=List(),g=10^(log(lim)\log(2))); forprime(p=7,lim,if(g%znorder(Mod(10,p))==0, listput(v,p))); Vec(v) \\ Charles R Greathouse IV, May 26 2011

Extensions

Arbitrary limit removed and sequence extended by Phil Carmody, May 26 2011

A072074 Number of integers k such that phi(k) = 10^n.

Original entry on oeis.org

2, 2, 4, 11, 16, 24, 43, 63, 94, 152, 224, 324, 464, 644, 897, 1271, 1790, 2521, 3501, 4814, 6535, 8779, 11739, 15585, 20625, 27166, 35588, 46363, 60065, 77424, 99337, 127020, 161930, 205847, 260929, 329782, 415533, 522173, 654548, 818278, 1020391
Offset: 0

Views

Author

Labos Elemer, Jun 13 2002

Keywords

Comments

a(n) is the coefficient of x^n*y^n in Product_p Sum_{u, v} x^u*y^v, where the product is taken over all primes p and the sum is taken over such u, v that 2^u*5^v = phi(p^k) for some nonnegative integer k. - Max Alekseyev, Apr 26 2010
Elaborating on above comment, primes p must be in A077497 and k must be 1 for primes other than 2 and 5. - Ray Chandler, Feb 12 2012

Examples

			n=3: a(3)=11 because InvPhi(1000) = {1111, 1255, 1375, 1875, 2008, 2222, 2500, 2510, 2750, 3012, 3750}.
		

Crossrefs

Programs

  • Maple
    [seq(nops(invphi(10^i)),i=1..8)];
  • PARI
    a(n) = #invphi(10^n); \\ for invphi see Alekseyev link \\ Michel Marcus, May 14 2020

Formula

a(n) = Card{x : A000010(x)=10^n}.

Extensions

More terms from Max Alekseyev, Apr 26 2010

A291049 Primes of the form 2^r * 17^s + 1.

Original entry on oeis.org

2, 3, 5, 17, 137, 257, 65537, 157217, 295937, 557057, 1336337, 96550277, 1212153857, 2281701377, 5473632257, 395469930497, 1401249857537, 2637646790657, 4964982194177, 28572702478337, 1271035441709057, 38280596832649217, 1872540629620228097, 6634884445436379137
Offset: 1

Views

Author

Muniru A Asiru, Sep 15 2017

Keywords

Comments

Primes of the forms a^r * b^s + 1 where (a, b) = (2,1), (2,3), (2,5), (2,7), (2,11) and (2,13) are A092506, A005109, A077497, A077498, A077499 and A173236.
Fermat prime exponents r are 0, 1, 2, 4, 8, 16.
For n > 2, all terms are congruent to 5 (mod 6).
Also, these are prime numbers p for which (p*34^p)/(p-1) is an integer.

Examples

			With n = 1, a(1) = 2^0 * 17^0 + 1 = 2.
With n = 5, a(5) = 2^3 * 17^1 + 1 = 137.
list of (r,s): (0,0), (1,0), (2,0), (4,0), (3,1), (8,0), (16,0), (5,3), (10,2), (15,1), (4,4), (2,6).
		

Crossrefs

Cf. Sequences of primes of form 2^n * q^u + 1: A092506 (q=1), A005109 (q=3), A077497 (q=5), A077498 (q=7), A077499 (q=11), A173236 (q=13).

Programs

  • GAP
    K:=26*10^7+1;; # to get all terms <= K.
    A:=Filtered(Filtered([1,3..K],i-> i mod 6=5),IsPrime);;    I:=[17];;
    B:=List(A,i->Elements(Factors(i-1)));;
    C:=List([0..Length(I)],j->List(Combinations(I,j),i->Concatenation([2],i)));;
    A291049:=Concatenation([2,3],List(Set(Flat(List([1..Length(C)],i->List([1..Length(C[i])],j->Positions(B,C[i][j]))))),i->A[i]));
    
  • Maple
    N:= 10^20: # to get all terms <= N+1
    S:= NULL:
    for r from 0 to ilog2(N) do
      for s from 0 to floor(log[17](N/2^r)) do
        p:= 2^r*17^s +1;
        if isprime(p) then
         S:= S, p
        fi
    od od:
    sort([S]); # Robert Israel, Sep 26 2017
  • Mathematica
    With[{nn = 10^19, q = 17}, Select[Sort@ Flatten@ Table[2^i*q^j + 1, {i, 0, Log[2, nn]}, {j, 0, Log[q, nn/2^i]}], PrimeQ]] (* Michael De Vlieger, Sep 18 2017, after Robert G. Wilson v at A005109 *)
  • PARI
    lista(nn) = my(t, v=List([])); for(r=0, logint(nn, 2), t=2^r; for(s=0, logint(nn\t, 17), if(isprime(t+1), listput(v, t+1)); t*=17)); Vec(vecsort(v)) \\ Jinyuan Wang, Jun 26 2022

A086983 Primes of the form 2^r*p^s - 1, where p is an odd prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 31, 37, 43, 47, 53, 61, 67, 71, 73, 79, 97, 103, 107, 127, 151, 157, 163, 191, 193, 199, 211, 223, 241, 271, 277, 283, 313, 331, 337, 367, 383, 397, 421, 431, 457, 463, 487, 499, 523, 541, 547, 577, 607, 613, 631, 647, 661, 673
Offset: 1

Views

Author

Ray Chandler, Aug 02 2003

Keywords

Comments

Primes p such that p+1 has at most one odd prime divisor.

Crossrefs

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    Primes:= select(isprime, [$3..(N+1)/2]):
    sort(convert(select(isprime, {2,seq(seq(seq(2^r*p^s-1, r = 1 .. ilog2((N+1)/p^s)),s=0..floor(log[p]((N+1)/2))),p=Primes)}),list)); # Robert Israel, Jun 13 2018
Showing 1-10 of 10 results.