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

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

A056637 a(n) is the least prime of class n-, according to the Erdős-Selfridge classification of primes.

Original entry on oeis.org

2, 11, 23, 47, 283, 719, 1439, 2879, 34549, 138197, 1266767, 14920303, 36449279, 377982107, 1432349099, 22111003847, 110874748763
Offset: 1

Views

Author

Robert G. Wilson v, Jan 31 2001

Keywords

Comments

A prime p is in class 1- if p-1 has no prime factor larger than 3. If p-1 has other prime factors, p is in class (c+1)-, where c- is the largest class of its prime factors. See also A005109.
1432349099 < a(16) <= 25782283783.
a(18) <= 619108107719, a(19) <= 19811459447009, a(20) <= 152772264735359. These upper limits can be found by generating class (n+1)- primes from a list of n- class primes; if the latter is sufficiently complete, one can deduce that there is no smaller (n+1)- prime. - M. F. Hasler, Apr 05 2007

Crossrefs

Programs

  • Mathematica
    PrimeFactors[n_Integer] := Flatten[ Table[ #[[1]], {1}] & /@ FactorInteger[n]]; NextPrime[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; 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; a = Table[0, {15}]; a[[1]] = 2; k = 5; Do[c = ClassMinusNbr[ k]; If[ a[[c]] == 0, a[[c]] = k]; k = NextPrime[k], {n, 3, 7223000}]; a

Formula

a(n+1) >= 2*a(n)+1, since a(n+1)-1 is even and must have a factor of class n- which is odd (n>1) and >= a(n). a(n+1) <= min { p = 2*k*a(n)+1 | k=1,2,3... such that p is prime }, since a(n) is a prime of class n-. - M. F. Hasler, Apr 05 2007

Extensions

Extended by Robert G. Wilson v, Mar 20 2003
More terms from Don Reble, Apr 11 2003
a(16) and a(17) from M. F. Hasler, Apr 21 2007

A005110 Class 2- primes (for definition see A005109).

Original entry on oeis.org

11, 29, 31, 41, 43, 53, 61, 71, 79, 101, 103, 113, 127, 131, 137, 149, 151, 157, 181, 191, 197, 211, 223, 229, 239, 241, 251, 271, 281, 293, 307, 313, 337, 379, 389, 401, 409, 421, 439, 443, 449, 457, 491, 521, 541, 547, 571, 593, 601, 613, 631, 641, 647, 653, 673
Offset: 1

Views

Author

Keywords

References

  • R. K. Guy, Unsolved Problems in Number Theory, A18.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • 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[122], ClassMinusNbr[ Prime[ # ]] == 2 &] ] (* Robert G. Wilson v *)

Extensions

Edited and extended by Robert G. Wilson v, Mar 20 2003
Corrected by R. J. Mathar, Feb 01 2007

A005111 Class 3- primes (for definition see A005109).

Original entry on oeis.org

23, 59, 67, 83, 89, 107, 173, 199, 227, 233, 263, 311, 317, 331, 349, 353, 367, 373, 383, 397, 419, 431, 463, 479, 503, 509, 523, 563, 569, 587, 607, 617, 619, 661, 683, 727, 733, 739, 743, 787, 809, 821, 823, 853, 859, 881, 887, 907, 929, 947, 977, 983, 991, 1031, 1033
Offset: 1

Views

Author

Keywords

References

  • R. K. Guy, Unsolved Problems in Number Theory, A18.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • 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[175], ClassMinusNbr[ Prime[ # ]] == 3 &]]

Extensions

Edited and extended by Robert G. Wilson v, Mar 20 2003
Corrected by R. J. Mathar, Feb 01 2007

A081427 Class 8- primes.

Original entry on oeis.org

2879, 20147, 25903, 34537, 46049, 58733, 63317, 65267, 69029, 69073, 74759, 80537, 86291, 86341, 103549, 106487, 108413, 112877, 120877, 131687, 135859, 138053, 140939, 141023, 147647, 155413, 157427, 165527, 172681, 187163, 189949, 207079
Offset: 1

Views

Author

Robert G. Wilson v, Mar 20 2003

Keywords

References

  • R. K. Guy, Unsolved Problems in Number Theory, A18.

Crossrefs

Programs

  • 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[20000], ClassMinusNbr[ Prime[ # ]] == 8 &]]

A005112 Class 4- primes (for definition see A005109).

Original entry on oeis.org

47, 139, 167, 179, 269, 277, 347, 461, 467, 499, 599, 643, 691, 709, 797, 827, 829, 839, 857, 863, 967, 997, 1013, 1019, 1039, 1063, 1069, 1151, 1163, 1181, 1289, 1367, 1381, 1399, 1427, 1487, 1493, 1499, 1579, 1609, 1619, 1657, 1867, 1877, 1889, 1933, 1979
Offset: 1

Views

Author

Keywords

References

  • R. K. Guy, Unsolved Problems in Number Theory, A18.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • 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[300], ClassMinusNbr[ Prime[ # ]] == 4 &]]

Extensions

Edited and extended by Robert G. Wilson v, Mar 20 2003

A081424 Class 5- primes (for definition see A005109).

Original entry on oeis.org

283, 359, 557, 659, 941, 1109, 1129, 1223, 1433, 1663, 1669, 1693, 1787, 1997, 2027, 2039, 2069, 2083, 2153, 2339, 2351, 2503, 2539, 2579, 2633, 2767, 2777, 2803, 2837, 2999, 3229, 3581, 3761, 3767, 3779, 3989, 4127, 4157, 4231, 4253, 4283, 4297, 4513
Offset: 1

Views

Author

Robert G. Wilson v, Mar 20 2003

Keywords

References

  • R. K. Guy, Unsolved Problems in Number Theory, A18.

Crossrefs

Programs

  • 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[700], ClassMinusNbr[ Prime[ # ]] == 5 &]]

A081425 Class 6- primes (for definition see A005109).

Original entry on oeis.org

719, 1319, 1699, 2447, 3343, 4079, 4139, 4457, 4517, 4679, 4703, 5273, 5647, 6653, 6793, 7523, 7529, 7559, 8599, 9227, 9587, 9623, 9839, 10159, 10343, 10723, 10771, 11069, 11213, 11279, 11321, 11489, 11863, 11887, 12163, 12917, 12919, 13163
Offset: 1

Views

Author

Robert G. Wilson v, Mar 20 2003

Keywords

References

  • R. K. Guy, Unsolved Problems in Number Theory, A18.

Crossrefs

Programs

  • 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[1700], ClassMinusNbr[ Prime[ # ]] == 6 &]]

A081429 Class 10- primes.

Original entry on oeis.org

138197, 207227, 621679, 621883, 633383, 760079, 829177, 863711, 898253, 978863, 1035499, 1036471, 1209191, 1451059, 1566179, 1658309, 1658353, 1761407, 1794229, 1796503, 1827479, 1900147, 2015303, 2029439, 2070997, 2072893
Offset: 1

Views

Author

Robert G. Wilson v, Mar 20 2003

Keywords

References

  • R. K. Guy, Unsolved Problems in Number Theory, A18.

Crossrefs

Programs

  • 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[200000], ClassMinusNbr[ Prime[ # ]] == 10 &]]

A081430 Class 11- primes.

Original entry on oeis.org

1266767, 1520159, 2486717, 3316619, 4144541, 4512947, 4836779, 5389519, 5638379, 6218827, 6448979, 6633457, 6771419, 6907247, 7460149, 7462639, 7600597, 7739033, 7874627, 8153567, 8291573, 9110639, 9112319, 9121003
Offset: 1

Views

Author

Robert G. Wilson v, Mar 20 2003

Keywords

References

  • R. K. Guy, Unsolved Problems in Number Theory, A18.

Crossrefs

Programs

  • 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[300000, 1000000], ClassMinusNbr[ Prime[ # ]] == 1 &]]
Showing 1-10 of 12 results. Next