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

A005108 Class 4+ primes (for definition see A005105).

Original entry on oeis.org

73, 313, 443, 617, 661, 673, 677, 691, 739, 757, 823, 887, 907, 941, 977, 1093, 1109, 1129, 1201, 1213, 1303, 1361, 1447, 1453, 1543, 1553, 1621, 1627, 1657, 1753, 1811, 1867, 1873, 1993, 1997, 2017, 2081, 2083, 2113, 2269, 2273, 2281, 2293, 2333, 2341
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

  • Maple
    For Maple program see Mathar link in A005105.
  • 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]]; ClassPlusNbr[n_] := Length[ NestWhileList[f, n, UnsameQ, All]] - 3; Prime[ Select[ Range[350], ClassPlusNbr[ Prime[ # ]] == 4 &]]

Extensions

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

A005107 Class 3+ primes (for definition see A005105).

Original entry on oeis.org

37, 103, 113, 151, 157, 163, 173, 181, 193, 227, 233, 257, 277, 311, 331, 337, 347, 353, 379, 389, 397, 401, 409, 421, 457, 463, 467, 487, 491, 521, 523, 541, 547, 569, 571, 601, 607, 613, 631, 653, 683, 701, 727, 733, 773, 787, 797, 811, 821, 829, 853, 857
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

  • Maple
    For Maple program see Mathar link in A005105.
  • 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]]; ClassPlusNbr[n_] := Length[ NestWhileList[f, n, UnsameQ, All]] - 3; Prime[ Select[ Range[150], ClassPlusNbr[ Prime[ # ]] == 3 &]]

Extensions

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

A081633 Class 5+ primes (for definition see A005105).

Original entry on oeis.org

1021, 1321, 1381, 1459, 1877, 2467, 2503, 2657, 2707, 3253, 3313, 3547, 3701, 3733, 3907, 4561, 4817, 4937, 5441, 5443, 5527, 5693, 5839, 5861, 6037, 6131, 6211, 6217, 6277, 6361, 6373, 6569, 6653, 7057, 7243, 7591, 7753, 7817, 7883, 8101, 8123, 8221
Offset: 1

Views

Author

Robert G. Wilson v, Mar 20 2003

Keywords

References

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

Crossrefs

Programs

  • Maple
    For Maple program see Mathar link in A005105.
  • 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]]; ClassPlusNbr[n_] := Length[ NestWhileList[f, n, UnsameQ, All]] - 3; Prime[ Select[ Range[1040], ClassPlusNbr[ Prime[ # ]] == 5 &]]

A005106 Class 2+ primes (for definition see A005105).

Original entry on oeis.org

13, 19, 29, 41, 43, 59, 61, 67, 79, 83, 89, 97, 101, 109, 131, 137, 139, 149, 167, 179, 197, 199, 211, 223, 229, 239, 241, 251, 263, 269, 271, 281, 283, 293, 307, 317, 349, 359, 367, 373, 419, 433, 439, 449, 461, 479, 499, 503, 509, 557, 563, 577, 587, 593
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

  • Maple
    For Maple program see Mathar link in A005105.
  • 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]]; ClassPlusNbr[n_] := Length[ NestWhileList[f, n, UnsameQ, All]] - 3; Prime[ Select[ Range[120], ClassPlusNbr[ Prime[ # ]] == 2 &]]

Formula

{prime(n): A126433(n) = 2}. - R. J. Mathar, Mar 26 2024

Extensions

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

A376700 The values of i in primes of the form 2^i*3^j - 1 (A005105) in the order of their appearance.

Original entry on oeis.org

0, 2, 1, 3, 2, 1, 3, 5, 4, 1, 3, 2, 7, 6, 7, 4, 3, 5, 2, 7, 5, 1, 11, 8, 13, 2, 1, 6, 5, 10, 8, 13, 17, 6, 11, 15, 4, 14, 3, 11, 19, 18, 12, 1, 7, 17, 13, 21, 4, 9, 2, 18, 17, 21, 7, 15, 3, 31, 8, 24, 13, 23, 12, 1, 28, 22, 19, 27, 27, 13, 34, 22, 11, 13, 10, 20, 1, 18, 23, 38
Offset: 1

Views

Author

Amiram Eldar, Oct 02 2024

Keywords

Crossrefs

Programs

  • Mathematica
    With[{lim = 10^12}, IntegerExponent[Select[Sort@ Flatten@Table[2^i*3^j - 1, {i, 0, Log2[lim]}, {j, 0, Log[3, lim/2^i]}], PrimeQ] + 1, 2]]
  • PARI
    lista(lim) = {my(s = List()); for(i = 0, logint(lim, 2), for(j = 0, logint(lim >> i, 3), listput(s, 2^i * 3^j - 1))); s = Set(s); for(i = 1, #s, if(isprime(s[i]), print1(valuation(s[i] + 1, 2), ", "))); }

Formula

a(n) = A007814(A005105(n)+1).

A376701 The values of j in primes of the form 2^i*3^j - 1 (A005105) in the order of their appearance.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 1, 0, 1, 3, 2, 3, 0, 1, 1, 3, 4, 3, 5, 2, 4, 7, 1, 3, 0, 7, 8, 5, 6, 3, 5, 2, 0, 7, 4, 2, 9, 3, 10, 5, 0, 1, 5, 12, 9, 4, 7, 2, 13, 10, 15, 5, 6, 4, 13, 8, 17, 0, 15, 5, 12, 6, 13, 20, 3, 7, 9, 4, 5, 14, 1, 9, 16, 15, 17, 11, 23, 13, 10, 1, 7, 7, 3, 19, 16, 3
Offset: 1

Views

Author

Amiram Eldar, Oct 02 2024

Keywords

Crossrefs

Programs

  • Mathematica
    With[{lim = 10^13}, IntegerExponent[Select[Sort@ Flatten@Table[2^i*3^j - 1, {i, 0, Log2[lim]}, {j, 0, Log[3, lim/2^i]}], PrimeQ] + 1, 3]]
  • PARI
    lista(lim) = {my(s = List()); for(i = 0, logint(lim, 2), for(j = 0, logint(lim >> i, 3), listput(s, 2^i * 3^j - 1))); s = Set(s); for(i = 1, #s, if(isprime(s[i]), print1(valuation(s[i] + 1, 3), ", "))); }

Formula

a(n) = A007949(A005105(n)+1).

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

A005113 Smallest prime in class n (sometimes written n+) according to the Erdős-Selfridge classification of primes.

Original entry on oeis.org

2, 13, 37, 73, 1021, 2917, 15013, 49681, 532801, 1065601, 8524807, 68198461, 545587687, 1704961513, 23869461181, 288310406533
Offset: 1

Views

Author

Keywords

Comments

A prime p is in class 1 if (p+1)'s largest prime factor is 2 or 3. If (p+1) has other prime factors, p's class is one more than the largest class of its prime factors. See also A005105.
John W. Layman observes that for n=10..13, the ratios r(n)= a(n)/a(n-1) are increasingly close to an integer, being 1.9999981, 7.99999906, 8.00000059 and 7.999999985.
Layman's observation is a consequence of a(n+1) = m*a(n)-1 for (n,m)=(1,7),(3,2),(4,14),(9,2),(10,8),(12,8),(14,14), while a(12) = 8 a(11)+5 is a coincidence which does not fit into that scheme. This relationship is not unusual since any N+ prime p is by definition such that p+1 = m*q where q is a (N-1)+ prime and m = (p+1)/q must be even since p,q are odd (except for q=2, allowing the odd m=7 for n=1 above) and the least N+ prime has good chances of having q equal to the least (N-1)+ prime. - M. F. Hasler, Apr 09 2007
a(n+1) >= 2*a(n)-1 since a(n+1)+1 = p*q with p of class n+ (thus >= a(n) and odd) and thus q >= 2 (even and positive). a(n+1) <= min { p = 2*k*a(n)-1 | k=1,2,3,... such that p is prime }. - M. F. Hasler, Apr 02 2007
a(17) <= 1833174628057, with equality if 916587314029 is the 10th 16+ prime; a(18) <= 3666349256113, with equality if a(17) = 1833174628057; a(19) <= 65994286610033, with equality if 41431295033731 is the third 18+ prime; a(20) <= 764276710625653, with equality if 382138355312827 is the third 19+ prime. - M. F. Hasler, Apr 09 2007

Examples

			1553 is in class 4 because 1553+1 = 2*3*7*37; 7 is in class 1 and 37 is in class 3. 37 is in class 3 because 37+1 = 2*19 and 19 is in class 2. 19 is in class 2 because 19+1 = 2*2*5 and 5 is in class 1. 5 is in class 1 because 5+1=2*3.
		

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]]; 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]]; ClassPlusNbr[n_] := Length[ NestWhileList[f, n, UnsameQ, All]] - 3; a = Table[0, {15}]; a[[1]] = 2; k = 5; Do[c = ClassPlusNbr[ k]; If[ a[[c]] == 0, a[[c]] = k]; k = NextPrime[k], {n, 1, 28700000}]; a
  • PARI
    checkclass(n,p)={ n=factor(n+1)[,1]; n[#n] <= 3 && return(1); (#p <= 1 || n[#n] < p[#p]) && return(2); n[1]=p[#p]; p=vecextract(p,"^-1"); forstep( i=#n,2,-1, n[i] < n[1] && break; checkclass(n[i],p) > #p && return(2+#p)) }
    A005113(n,p,a=[])={ while( #a #a, p=nextprime(p+1)); a=concat(a,p); p=a[#a]*2-2); a } \\ A005113(11) takes < 10 sec @ 2 GHz in 2007; less than 2.5 sec @ 2 GHz in 2013. \\ M. F. Hasler, Apr 02 2007
    
  • PARI
    class(n, s=+1 /* for n+ class; -1 for n- class */)={ isprime(n) || return; (( n=factor(n+s)[,1] ) && n[ #n]>3 ) || return(1); vecsort( vector( #n,i,class( n[i],s )))[#n]+1 }
    someofnextclass( a, limit=0, s=0, b=[], p)={ if(!s,/* guess + or - */ s=( class(a[1]) && class(a[1])==class(a[2]) )*2-1 ); print("looking for primes of class ", 1+class( a[1], s), ["+","-"][1+(s<0)] ); for( i=1,#a, p=-s; until( p>=limit, until( isprime(p), p+=a[i]<<1 ); b=concat(b,p); if( !limit, limit=p)) ); vecsort(b) };
    c=A090468; for(i=15,20,c=someofnextclass(c,9e12);print("least prime of class ",i,"+ is <= ",c[1])) \\  M. F. Hasler, Apr 09 2007

Extensions

Extended through a(12) by Robert G. Wilson v
a(13) from John W. Layman
a(14) from Don Reble, Apr 11 2003
a(15) from Sam Handler (sam_5_5_5_0(AT)yahoo.com), Aug 17 2006
a(7) corrected by Tomás Oliveira e Silva, Oct 27 2006
a(16) calculated using A129475(n) up to n=19 by M. F. Hasler, Apr 16 2007
Edited by Max Alekseyev, Aug 17 2013

A048251 a(n) is the smallest number whose sum of divisors is 6^n.

Original entry on oeis.org

1, 5, 22, 102, 510, 3210, 17490, 112890, 600270, 3466470, 20205570, 118879530, 697118730, 3949737330, 24217298490, 143487592710, 841422307110, 4973562896610, 29520886859310, 180254162529210, 1052751138726210, 6301225298627490, 37854941354933010, 224270177470178070
Offset: 0

Views

Author

Keywords

Comments

Terms of this sequence are products of distinct terms in A005105. - Ray Chandler, Sep 01 2010

Examples

			sigma(k) = 1296 = 6^4 for each k in {510, 642, 710, 742, 782, 795, 862, 935, 1177, 1207, 1219}; the smallest of these is a(4)=510.
		

Crossrefs

Programs

  • PARI
    a(n) = {my(k=1); while (sigma(k) != 6^n, k++); k;} \\ Michel Marcus, May 14 2018

Formula

a(n) = Min{k : A000203(k) = 6^n}.

Extensions

a(9)-a(14) from Donovan Johnson, Sep 02 2008
a(15)-a(24) from Walter Kehowski, Aug 22 2010
Edited and extended by Ray Chandler, Sep 01 2010
Error in sequence corrected by N. J. A. Sloane, Oct 04 2010

A081639 Class 11+ primes.

Original entry on oeis.org

8524807, 18381361, 18575041, 19180817, 21312019, 31984321, 34099231, 40357021, 44206633, 44839273, 48499459, 51148847, 51444961, 51884467, 54144121, 57129613, 57780487, 58293601, 61378571, 65578901, 66786721, 66787873
Offset: 1

Views

Author

Robert G. Wilson v, Mar 20 2003

Keywords

References

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

Crossrefs

Programs

  • Maple
    For Maple program see Mathar link in A005105.
  • 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]]; ClassPlusNbr[n_] := Length[ NestWhileList[f, n, UnsameQ, All]] - 3; Prime[ Select[ Range[150000], ClassPlusNbr[ Prime[ # ]] == 11 &]]
Showing 1-10 of 52 results. Next