A005109 Class 1- (or Pierpont) primes: primes of the form 2^t*3^u + 1.
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
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).
Links
- Robert G. Wilson v, Table of n, a(n) for n = 1..8396 (terms 1..795 from T. D. Noe, terms 796..1602 from Joerg Arndt)
- Claudi Alsina and Roger B. Nelson, A Panoply of Polygons, Dolciani Math. Expeditions Vol. 58, AMS/MAA (2023), see page 112.
- Chris K. Caldwell, The Prime Pages.
- David A. Cox and Jerry Shurman, Geometry and number theory on clovers, Amer. Math. Monthly, Vol. 112, No. 8 (2005), pp. 682-704.
- Andrew M. Gleason, Angle Trisection, the Heptagon and the Triskaidecagon, American Mathematical Monthly, Vol. 95, No. 3 (1988), pp. 185-194.
- Ernest G. Hibbs, Component Interactions of the Prime Numbers, Ph. D. Thesis, Capitol Technology Univ. (2022), see p. 33.
- Joel C. Langer and David A. Singer, Subdividing the trefoil by origami, Geometry, Vol. 2013 (Hindawi Publishing Company, 2013), Article ID 897320. - From _N. J. A. Sloane_, Feb 08 2013
- James Pierpont, On an Undemonstrated Theorem of the Disquisitiones Arithmeticae, American Mathematical Society Bulletin, Vol. 2, No. 3 (1895-1896), pp. 77-83.
- Eric Weisstein's World of Mathematics, Pierpont Prime.
- Index entries for sequences related to the Erdos-Selfridge classification
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
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
Comments