login
A130096
Primes prime(n) such that both of the numbers (prime(n+1)^2-prime(n)^2)/2 - 1 and (prime(n+1)^2-prime(n)^2)/2 + 1 are not primes.
1
31, 47, 59, 71, 79, 83, 101, 107, 113, 127, 131, 149, 151, 157, 173, 193, 211, 223, 229, 233, 271, 311, 317, 337, 347, 349, 373, 383, 389, 401, 439, 457, 461, 467, 487, 491, 509, 521, 523, 541, 563, 569, 571, 593, 647, 653, 661, 683, 709, 727, 733, 743, 773
OFFSET
1,1
LINKS
EXAMPLE
a(1)=31 because (37^2 - 31^2)/2 - 1 = 203 and (37^2 - 31^2)/2 + 1 = 205 (203, 205 are not primes),
a(2)=47 because (53^2 - 47^2)/2 - 1 = 299 and (53^2 - 47^2)/2 + 1 = 301 (299, 301 are not primes),
a(3)=59 because (61^2 - 59^2)/2 - 1 = 119 and (61^2 - 59^2)/2 + 1 = 121 (119, 121 are not primes), ...
MAPLE
ts_p3_21:=proc(n) local a, b, i, ans; ans := [ ]: for i from 2 to n do a := (ithprime(i+1)^(2)-ithprime(i)^(2))/2-1: b := (ithprime(i+1)^(2)-ithprime(i)^(2))/2+1: if not (isprime(a)=true or isprime(b)=true) then ans := [ op(ans), ithprime(i) ]: fi od; RETURN(ans) end: ts_p3_21(500);
MATHEMATICA
Transpose[Select[Partition[Prime[Range[2, 250]], 2, 1], PrimeQ[(#[[2]]^2- #[[1]]^2)/2+{1, -1}]=={False, False}&]][[1]] (* Harvey P. Dale, Jun 19 2014 *)
Select[Partition[Prime[Range[2, 150]], 2, 1], NoneTrue[(#[[2]]^2- #[[1]]^2)/ 2+{1, -1}, PrimeQ]&][[All, 1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 10 2021 *)
CROSSREFS
Cf. A130761.
Sequence in context: A046047 A014313 A095318 * A229624 A270781 A075586
KEYWORD
nonn
AUTHOR
Jani Melik, Aug 01 2007
STATUS
approved