OFFSET
1,1
EXAMPLE
a(1)=3 because (5^2 - 3^2)/2 - 1 = 7 and (5^2 - 3^2)/2 + 1 = 9 (7 is prime),
a(2)=5 because (7^2 - 5^2)/2 - 1 = 11 and (7^2 - 5^2)/2 + 1 = 13 (11 and 13 are primes),
a(3)=7 because (11^2 - 7^2)/2 - 1 = 35 and (11^2 - 7^2)/2 + 1 = 37 (37 is prime), ...
MAPLE
ts_p3:=proc(n) local a, b, i, ans; ans := [ ]: for i from 2 by 1 to n do a := (ithprime(i+1)^(2)-ithprime(i)^(2))/2-1: b := (ithprime(i+1)^(2)-ithprime(i)^(2))/2+1: if (isprime(a)=true or isprime(b)=true) then ans := [ op(ans), ithprime(i) ]: fi od; RETURN(ans) end: ts_p3(200);
CROSSREFS
KEYWORD
nonn
AUTHOR
Jani Melik, Aug 01 2007
STATUS
approved