A075582 Duplicate of A059960.
5, 11, 17, 71, 107, 191, 431, 1151, 2591, 139967, 472391, 786431, 995327, 57395627, 63700991, 169869311
Offset: 1
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.
a(8) = 11 since 20 = 2*2*5, 21 = 3*7, 22 = 2*11 are the numbers between prime(8) = 19 and prime(9) = 23. For n=9, n-th prime is 23, composites between 23 and next prime are 24 25 26 27 29 of which largest prime divisor is 13, so a(9)=13.
a052248 n = a052248_list !! (n-2) a052248_list = f a065091_list where f (p:ps'@(p':ps)) = (maximum $ map a006530 [p+1..p'-1]) : f ps' -- Reinhard Zumkeller, Jun 22 2011
g[n_] := Block[{t = Range[Prime[n] + 1, Prime[n + 1] - 1]}, Max[First /@ Flatten[ FactorInteger@t, 1]]]; Table[ g[n], {n, 2, 72}] (* Robert G. Wilson v, Feb 08 2006 *) cmp[{a_,b_}]:=Max[Flatten[FactorInteger/@Range[a+1,b-1],1][[All,1]]]; cmp/@ Partition[ Prime[Range[2,80]],2,1] (* Harvey P. Dale, May 16 2020 *)
forprime(p=3,360,q=nextprime(p+1); m=0; for(j=p+1,q-1,f=factor(j); a=f[matsize(f)[1],1]; if(m
lst={}; Do[p=Prime[n]; If[PrimeQ[6*p-1] && PrimeQ[6*p+1], AppendTo[lst,p]], {n,100}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 16 2009 *)
forprime(p=2, 9999, if(isprime(6*p+1) & isprime(6*p-1), print(p))) \\ David Radcliffe, Apr 02 2016
from sympy import *; print([p for p in primerange(2,9999) if isprime(6*p-1) and isprime(6*p+1)]) # David Radcliffe, Apr 02 2016
Table[i=1; While[Length[Union[Flatten[Table[First/@FactorInteger[j],{j,(x=Prime[i])+1,NextPrime[x]-1}]]]]!=n,i++]; x,{n,0,47}] (* Jayanta Basu, May 25 2013 *)
a:=[]; for k in PrimesInInterval(2,3000) do b:={}; for s in [k..NextPrime(k)-1] do if not IsPrime(s) then b:=b join Set(PrimeDivisors(s)); end if; end for; if #Set(b) eq 3 then Append(~a,k); end if; end for; a; // Marius A. Burtea, Sep 26 2019
For p = 79, the next prime number is 83. The numbers between 79 and 83 and the prime divisors are respectively 80 { 2, 5 }, 81 { 3 }, 82 { 2, 41 }. The set of prime divisors is { 2, 3, 5, 41 } and has 4 elements, so 79 is a term. - _Marius A. Burtea_, Sep 26 2019
a:=[]; for p in PrimesInInterval(2,4800) do b:={}; for s in [p..NextPrime(p)-1] do if not IsPrime(s) then b:=b join Set(PrimeDivisors(s)); end if; end for; if #Set(b) eq 4 then Append(~a,p); end if; end for; a; // Marius A. Burtea, Sep 26 2019
Select[Prime@ Range@ 650, Length@ Union@ Flatten@ Map[First /@ FactorInteger@ # &, Select[Range[#, NextPrime@ #], CompositeQ]] == 4 &] (* Michael De Vlieger, May 27 2016 *) Join[{13,79},Select[Prime[Range[23,650]],PrimeQ[#+2]&&PrimeNu[#+1]==4&]] (* This program assumes the correctness of the conjecture by Charles R. Greathouse, IV, in the Comments. *) (* Harvey P. Dale, Jun 07 2019 *)
lista(nn)=forprime(p=2, nn, allp = []; forcomposite (c = p+1, nextprime(p+1), allp = Set(concat(allp, (factor(c)[,1])~));); if (#allp == 4, print1(p, ", "));); \\ Michel Marcus, May 28 2016
is(n)=if(!isprime(n), return(0)); if(isprime(n+2), return(omega(n+1)==4)); if(isprime(n+4), omega(n+1)+omega(n+2)+omega(n+3)==5, 0) list(lim)=my(v=List(),t,p); lim\=1; for(e=4,logint(lim+2,3), p=precprime(3^e); if(isprime(p+4) && is(p), listput(v,p))); for(e=4,logint(lim+3,2), p=precprime(2^e); if(isprime(p+4) && is(p), listput(v,p))); p=2; forprime(q=3,lim+2, if(q-p==2 && omega(p+1)==4, listput(v,p)); p=q); Set(v) \\ Charles R Greathouse IV, Jun 01 2016
a:=[]; for k in PrimesInInterval(2,25000) do b:={}; for s in [k..NextPrime(k)-1] do if not IsPrime(s) then b:=b join Set(PrimeDivisors(s)); end if; end for; if #Set(b) eq 5 then Append(~a,k); end if; end for; a; // Marius A. Burtea, Sep 26 2019
dpd5Q[p_]:=Length[Union[Flatten[FactorInteger[#][[All,1]]&/@Range[ p+1,NextPrime[ p]-1]]]]==5; Select[Prime[Range[3000]],dpd5Q] (* Harvey P. Dale, Aug 11 2021 *)
Between 31 and the next prime 37, there are 5 composite numbers whose prime divisors are respectively for 32: {2}, 33: {3,11}, 34: {2,17}, 35: {5,7} and 36: {2,3}; hence, these distinct prime divisors are {2,3,5,7,11,17}, the number of these distinct prime divisors is 6, so 31 is a term. - _Bernard Schott_, Sep 26 2019
a:=[]; for k in PrimesInInterval(2,10000) do b:={}; for s in [k..NextPrime(k)-1] do if not IsPrime(s) then b:=b join Set(PrimeDivisors(s)); end if; end for; if #Set(b) eq 6 then Append(~a,k); end if; end for; a; // Marius A. Burtea, Sep 26 2019
Select[Partition[Prime[Range[1250]],2,1],Length[Union[Flatten[ FactorInteger/@ Range[ #[[1]]+1,#[[2]]-1],1][[All,1]]]]==6&][[All,1]] (* Harvey P. Dale, May 25 2020 *)
pd[n_]:=Transpose[FactorInteger[n]][[1]]; Transpose[Select[ Partition[ Prime[ Range[500]],2,1],Length[Union[Flatten[ pd/@Range[First[#]+1, Last[#]-1]]]] == 7&]][[1]] (* Harvey P. Dale, Jun 15 2013 *) Select[Prime@ Range@ 500, Length@ Union@ Flatten@ Map[First /@ FactorInteger@ # &, Select[Range[#, NextPrime@ #], CompositeQ]] == 7 &] (* Michael De Vlieger, May 27 2016 *)
For p = 131, the next prime number is 137. The numbers between 131 and 137 and the prime factors are respectively 132 { 2, 3, 11 }, 133 { 7, 19 }, 134 { 2, 67 }, 135 { 3, 5 }, 136 { 2, 17 }. The set of prime divisors is { 2, 3, 5, 7, 11, 17, 19, 67 } and has 8 elements, so 131 is a term. - _Marius A. Burtea_, Sep 26 2019
a:=[]; for p in PrimesInInterval(2,7000) do b:={}; for s in [p..NextPrime(p)-1] do if not IsPrime(s) then b:=b join Set(PrimeDivisors(s)); end if; end for; if #Set(b) eq 8 then Append(~a,p); end if; end for; a; // Marius A. Burtea, Sep 26 2019
Select[Partition[Prime[Range[1000]],2,1],Length[Union[ Flatten[ FactorInteger[ Range[ #[[1]]+1,#[[2]]-1]],1][[All,1]]]]==8&][[All,1]] (* Harvey P. Dale, Dec 26 2019 *)
Comments