A092737 Duplicate of A072669.
7, 11, 17, 23, 29, 41, 59, 67, 83, 89, 127, 137, 151, 197, 239, 257, 307, 359, 383, 389
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:= n-> add(`if`(isprime(ithprime(n)+ithprime(i)-1), 1, 0), i=1..n-1): seq(a(n), n=1..100); # Alois P. Heinz, Apr 18 2013
Table[p = Prime[n]; c = 0; i = 1; While[i < n, If[PrimeQ[p + Prime[i] - 1], c = c + 1]; i++]; c, {n, 72}] Table[Count[Prime[n]+Prime[Range[n-1]]-1,?PrimeQ],{n,80}] (* _Harvey P. Dale, Nov 04 2020 *)
f[n_] := Prime[n] + Prime[n + 1] + 1; f[ # ] & /@ Select[ Range[120], PrimeQ[ f[ # ]] &] (* Robert G. Wilson v, Apr 14 2004 *)
list(lim)=my(v=List(),p=2,t);forprime(q=3,,t=p+q+1;if(t>lim,return(Vec(v)));if(isprime(t),listput(v,t))) \\ Charles R Greathouse IV, Mar 19 2013
[NthPrime(n): n in [1..200] | IsPrime(NthPrime(n) + NthPrime(n+1)-1)] // Vincenzo Librandi, Aug 26 2012
Transpose[Select[Partition[Prime[Range[130]], 2, 1], PrimeQ[Total[#]-1]&]] [[1]] (* Harvey P. Dale, Feb 29 2012 *) Select[Prime[Range[200]],PrimeQ[#+NextPrime[#]-1]&] (* Vincenzo Librandi, Aug 26 2012 *)
[n: n in [1..200] | IsPrime(NthPrime(n) + NthPrime(n+1)-1)] // Vincenzo Librandi, Aug 26 2012
N:= 10^4: # to get all terms n such that prime(n+1) <= N Primes:= select(isprime,[2,seq(2*i+1,i=1..floor(N/2))]): PP:= Primes[1..-2]+Primes[2..-1]: select(t -> isprime(PP[t]-1), [$1..nops(PP)]); # Robert Israel, Dec 11 2014
Select[Range[200], PrimeQ[Prime[#]+Prime[#+1]-1] &] (* Harvey P. Dale, Dec 16 2010 *)
Select[Table[Prime[n] + Prime[n + 1] - 5, {n, 200}], PrimeQ] Select[Total/@Partition[Prime[Range[200]],2,1]-5,PrimeQ] (* Harvey P. Dale, Apr 05 2020 *)
p=2;forprime(q=3,1e4,if(isprime(t=p+q-5),print1(t", "));p=q) \\ Charles R Greathouse IV, Apr 13 2012
a(1) = 5^2 + 7^2 - 1 = 73, which is prime.
K := proc(x) local a; a:=ithprime(x)^2+ithprime(x+1)^2-1; if (isprime(a))then RETURN (a) fi: end: seq(K(x), x=1..500); # K. D. Bajpai, Jul 07 2013 K:=proc()local x,a,c; c:=1; for x from 1 to 5000 do; a:=ithprime(x)^2+ithprime(x+1)^2-1;if isprime(a) then lprint(c,a);c:=c+1;fi;od; end: K(); # K. D. Bajpai, Jul 07 2013
t = {}; Do[p = Prime[n]; q = Prime[n + 1]; p2 = p^2 + q^2 - 1; If[PrimeQ[p2], AppendTo[t, p2]], {n, 200}]; t (* T. D. Noe, Jul 09 2013 *)
is(n)=if(isprime(n), my(x=sqrtint((n+1)\2)); nextprime(x+1)^2 +precprime(x)^2==n+1 && n>3, 0) \\ Charles R Greathouse IV, Jul 08 2013
p=2;forprime(q=3,1e5,if(isprime(t=p^2+q^2-1),print1(t", "));p=q) \\ Charles R Greathouse IV, Jul 08 2013
Select[ Range[ 10000 ], PrimeQ[ # ] && PrimeQ[ Prime[ # ] + Prime[ # + 1 ] - 1 ] && PrimeQ[ Prime[ # ] + Prime[ # + 1 ] + 1 ] & ]
Select[Table[Prime[n] + Prime[n + 1] + 5, {n, 200}], PrimeQ] Select[Total[#]+5&/@Partition[Prime[Range[300]],2,1],PrimeQ] (* Harvey P. Dale, Dec 28 2021 *)
p=2;forprime(q=3,1e4,if(isprime(t=p+q+5),print1(t", "));p=q) \\ Charles R Greathouse IV, Apr 13 2012
3+5+5 = 13 = 7+11-5, 23+29-5 = 47 = 19+23+5
a1 = Select[Table[Prime[n] + Prime[n + 1] - 5, {n, 2010}], PrimeQ]; a2 = Select[Table[Prime[n] + Prime[n + 1] + 5, {n, 2000}], PrimeQ]; Intersection[a1, a2] With[{pr=Transpose[#+{5,-5}&/@Total/@Partition[Prime[Range[3000]],2,1]]}, Select[Intersection[pr[[1]],pr[[2]]], PrimeQ]] (* Harvey P. Dale, Mar 13 2013 *)
p=2;q=3;r=5;forprime(s=7,1e4,if((r==p+10||r+s==p+q+10) && isprime(p+q+5), print1(p+q+5", "));p=q;q=r;r=s) \\ Charles R Greathouse IV, Apr 16 2012
Comments