A155847 Primes of the form 2^p-p*q where p is prime,q=7.
-13, -3, 79, 8101
Offset: 1
Keywords
Programs
-
Mathematica
q=7;lst={};Do[p=Prime[n];If[PrimeQ[p=2^p-p*q],AppendTo[lst,p]],{n,5!}];lst
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.
q=7;lst={};Do[p=Prime[n];If[PrimeQ[p=2^p-p*q],AppendTo[lst,p]],{n,5!}];lst
a(3) = 67 is a term because 67 = 2^6 + 3 where 67 and 3 are prime and 6 is divisible by 3.
R:= NULL: count:= 0: for k from 1 while count < 15 do P:= sort(convert(numtheory:-factorset(k),list)); for p in P do x:= 2^k+p; if isprime(x) then R:= R,x; count:= count+1; fi od od:R;
For q = 9, 2^9+9 = 521 which is prime.
Select[Table[If[!PrimeQ[n],2^n+n,0],{n,1200}],PrimeQ] (* Vladimir Joseph Stephan Orlovsky, Feb 18 2011*)
g1(p,n)=for(x=1,n,c=composite(x);y=p^c+c;if(gcd(y,c)==1,if(isprime(y),print1 (y",")))) composite(n) = \ the n-th composite number { local(c,x); c=1; x=0; while(c <= n, x++; if(!isprime(x),c++); ); return(x) }
q=9;lst={};Do[p=Prime[n];If[PrimeQ[p=2^p-p*q],AppendTo[lst,p]],{n,5!}];lst Select[2^#-9#&/@Prime[Range[50]],PrimeQ] (* Harvey P. Dale, Aug 26 2014 *)
q=15;lst={};Do[p=Prime[n];If[PrimeQ[p=2^p-p*q],AppendTo[lst,p]],{n,5!}];lst
Comments