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-4 of 4 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

A122254 Numbers with 3-smooth Euler's totient (A000010).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 26, 27, 28, 30, 32, 34, 35, 36, 37, 38, 39, 40, 42, 45, 48, 51, 52, 54, 56, 57, 60, 63, 64, 65, 68, 70, 72, 73, 74, 76, 78, 80, 81, 84, 85, 90, 91, 95, 96, 97, 102, 104, 105, 108, 109, 111, 112, 114
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 29 2006

Keywords

Comments

An integer n>=3 belongs to this sequence if and only if a regular n-gon can be constructed using straightedge and conic sections (details in Gibbins and Smolinsky, see below). - Austin Shapiro, Nov 14 2021
Products of 3-smooth numbers (A003586) and squarefree numbers whose prime factors are all Pierpont primes (A005109). - Amiram Eldar, Dec 03 2022

Crossrefs

Cf. A000010, A003586 (3-smooth), A005109.
Subsequence of A122260.

Programs

  • Mathematica
    Select[Range@115, Max[FactorInteger[EulerPhi[#]][[All, 1]]] < 5 &] (* Ivan Neretin, Jul 28 2015 *)
  • PARI
    is(n)=n=eulerphi(n);n>>=valuation(n,2);n==3^valuation(n,3) \\ Charles R Greathouse IV, Feb 21 2013
    
  • PARI
    list(lim)=my(v=List(),u,t);for(i=0,log(lim--+1.5)\log(3),t=3^i;while(t<=lim,if(isprime(t+1),listput(v,t+1));t<<=1));v=vecsort(Vec(v));u=List([1]);for(i=3,#v,for(j=1,#u,t=v[i]*u[j];if(t>lim,next(2));listput(u,t)));u=vecsort(Vec(u));v=List(u);for(i=1,#u,t=u[i];while((t*=3)<=lim,listput(v,t)));u=Vec(v);v=List(u);for(i=1,#u,t=u[i];while((t<<=1)<=lim,listput(v,t)));vecsort(Vec(v)) \\ Charles R Greathouse IV, Feb 22 2013
    
  • Python
    from itertools import count, islice
    from sympy import multiplicity, factorint
    def A065333(n): return int(3**(multiplicity(3,m:=n>>(~n&n-1).bit_length()))==m)
    def A122254_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:all(p<=3 or (e==1 and A065333(p-1)) for p,e in factorint(n).items()), count(max(startvalue,1)))
    A122254_list = list(islice(A122254_gen(),40)) # Chai Wah Wu, Dec 20 2024

Formula

a(n) = A048135(n-2) for n>2.
a(n) = A122260(n) = A048737(n) for n < 22.
Sum_{n>=1} 1/a(n) = 3 * Product_{p > 3 in A005109} (1 + 1/p) = 5.38288865867495675807... . - Amiram Eldar, Dec 03 2022

A122261 Characteristic function of numbers having only factors that are Pierpont primes.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 29 2006

Keywords

Examples

			For n = 11 = 11^1, 11 is not a Pierpoint prime because 11-1 = 10 = 2*5 has a prime factor larger than 3, thus a(11) = 0.
For n = 25 = 5^2, 5 is a Pierpoint prime as 5-1 = 4 = 2^2 does not have any prime factors larger than 3, thus a(25) = 1.
		

Crossrefs

Cf. A005109, A065333, A122255, A122262 (partial sums).
Characteristic function of A122260.

Programs

  • Mathematica
    Block[{nn = 105, s}, s = Select[Sort@ Flatten@ Table[2^i*3^j + 1, {i, 0, Log2@ nn}, {j, 0, Log[3, nn/2^i]}] , PrimeQ]; Table[Boole[n == 1] + Boole@ AllTrue[FactorInteger[n][[All, 1]], MemberQ[s, #] &], {n, nn}]] (* Michael De Vlieger, Aug 23 2017, after Robert G. Wilson v at A005109 *)
  • PARI
    A065333(n) = ((3^valuation(n, 3)<Charles R Greathouse IV, Aug 21 2011
    A122261(n) = factorback(apply(p -> A065333(p-1), (factor(n)[, 1]))); \\ Antti Karttunen, Aug 22 2017

Formula

Multiplicative with a(p) = A065333(p-1), for p prime.
a(n) = if n=1 then 0 else A122262(n) - A122262(n-1).
a(A122260(n)) = 1.
a(n) = A122255(n) for n < 25.

Extensions

An unnecessary part removed from the formula and the Example section added by Antti Karttunen, Aug 22 2017

A048737 Numbers whose prime divisors consist of primes p such that 2^p-1 is prime.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 25, 26, 27, 28, 30, 31, 32, 34, 35, 36, 38, 39, 40, 42, 45, 48, 49, 50, 51, 52, 54, 56, 57, 60, 61, 62, 63, 64, 65, 68, 70, 72, 75, 76, 78, 80, 81, 84, 85, 89, 90, 91, 93, 95, 96, 98, 100, 102, 104, 105
Offset: 1

Views

Author

Keywords

Comments

Multiplicative closure of A000043. - Charles R Greathouse IV, Feb 21 2013

Examples

			10 = 2 * 5 is a term since both 2 and 5 are Mersenne exponents (A000043).
		

Crossrefs

Programs

  • Mathematica
    p = Join[{1}, MersennePrimeExponent @ Range[12]]; Select[Range[p[[-1]]], AllTrue[FactorInteger[#][[;; , 1]], MemberQ[p, #] &] &] (* Amiram Eldar, Sep 27 2020 *)

Formula

a(n) = A122254(n) = A122260(n) for n < 22. - Reinhard Zumkeller, Aug 29 2006
Sum_{n>=1} 1/a(n) = Product_{p in A000043} p/(p-1) = 5.7838... - Amiram Eldar, Sep 27 2020

Extensions

More terms from James Sellers, Apr 22 2000
Showing 1-4 of 4 results.