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

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

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 &]]

A081635 Class 7+ primes.

Original entry on oeis.org

15013, 16333, 22093, 24841, 43321, 49003, 52517, 54721, 62533, 63761, 69061, 69073, 70061, 74597, 75781, 75793, 75913, 82561, 83233, 84673, 87433, 87509, 88793, 91081, 92761, 94321, 98737, 99367, 101641, 105097, 110881, 111973, 114343
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[10820], ClassPlusNbr[ Prime[ # ]] == 7 &]]

A081638 Class 10+ primes.

Original entry on oeis.org

1065601, 2424973, 5114881, 7222561, 8124481, 8524091, 8647411, 8650321, 9190681, 9287521, 9590417, 10617601, 10929817, 11996161, 12349093, 12508081, 12786181, 12971117, 13570681, 14113027, 14308123, 14312743, 14476807
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[ # ]] == 10 &]]

A081634 Class 6+ primes.

Original entry on oeis.org

2917, 4933, 5413, 7507, 8167, 8753, 10567, 10627, 11047, 11261, 11677, 12073, 12251, 12421, 12433, 12553, 12721, 14293, 15017, 17041, 18181, 18493, 19267, 19333, 20023, 21193, 21313, 21661, 22397, 24481, 25933, 26261, 26437, 27361
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[3000], ClassPlusNbr[ Prime[ # ]] == 6 &]]

A081636 Class 8+ primes.

Original entry on oeis.org

49681, 109441, 120103, 151561, 198733, 210193, 246241, 255043, 266401, 280243, 295873, 326659, 326701, 347773, 355171, 360421, 368881, 397633, 397673, 423001, 441877, 447137, 471241, 480541, 489989, 499397, 508037, 511507, 532757, 539401
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[44535], ClassPlusNbr[ Prime[ # ]] == 8 &]]

A081637 Class 9+ primes.

Original entry on oeis.org

532801, 710341, 720617, 1212487, 1261157, 1372081, 1457293, 1490429, 1532173, 1657801, 1788547, 1789093, 1809601, 1829293, 1887877, 1944181, 1960141, 1997587, 2121853, 2161853, 2474413, 2484049, 2557441, 2578801, 2613607
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[196000], ClassPlusNbr[ Prime[ # ]] == 9 &]]

A129469 Least prime of Erdos-Selfridge class n+ in A129470.

Original entry on oeis.org

883, 3181, 15913, 2146141, 17227801, 456185017, 4960846573, 568124640697, 2273325467773, 145351829612377, 9302101084613641, 595332797734595317, 5813792718345189961, 1139502378775815768313, 166245781044286357673761
Offset: 3

Views

Author

M. F. Hasler, Apr 16 2007

Keywords

Comments

The sequence starts at offset 3, since primes of class 1+ and 2+ have all prime factors (of p+1) of class 1+. Definitions imply that a(n) >= -1+2*A005113(n-1)*nextprime(1+A005113(n-1)). We have a(n) = -1+2*A005113(n-1)*p for all n<18, with p prime for n>3. This holds probably for all n.

Examples

			a(3) = 883 = -1+2*13*17 is a prime of class 3+ since 13 is of class 2+, but the largest divisor of 883+1 is 17 which is only of class 2+.
a(4) = 3181 = -1+2*37*43 is a prime of class 4+ since 37 is of class 3+, but the largest divisor of 3181+1 is 43 which is only of class 2+.
		

Crossrefs

Programs

  • PARI
    class(n,s=1)={n=factor(n+s)[,1]; if(n[ #n]<=3,1, for(i=2,#n,n[1]=max(class(n[i],s)+1,n[1]));n[1])}; A129469={vector(#A005113-1,i,t=A005113[i+1]; t=[t,nextprime(t+1)-1,0];until( isprime( t[3] = -1+2*t[1]*t[2] ) & (f=factor( 1+t[3] )[,1]) & class(f[ #f],1)= i+1, print("Warning, crossed a prime of class >= ",i+1,"+, p=", t[2]); ); ); print(i+2," ",t[3]); t[3])}

A084071 Class 12+ primes.

Original entry on oeis.org

68198461, 115084901, 138358573, 156811273, 213397621, 220576331, 234432217, 260050573, 282261961, 290996753, 330864497, 353653063, 371500819, 383616341, 406915273, 426240379, 445800983, 446707201, 449558323, 460339577, 472782553
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[25000000], ClassPlusNbr[ Prime[ # ]] == 12 &]]

A090468 Class 13+ primes.

Original entry on oeis.org

545587687, 852480757, 1048438561, 1150849009, 1323457987, 1745980517, 1756123441, 1785398401, 1798736161, 1892507347, 1937020021, 2002155601, 2136716521, 2150905573, 2229004913, 2548101601, 2671514917, 2838761021
Offset: 1

Views

Author

Robert G. Wilson v, Nov 26 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[195000000], ClassPlusNbr[ Prime[ # ]] == 13 &]]
Showing 1-10 of 13 results. Next