|
|
A130066
|
|
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 primes.
|
|
1
|
|
|
5, 13, 29, 43, 103, 163, 167, 421, 547, 557, 587, 631, 659, 691, 701, 809, 823, 883, 919, 977, 1249, 1367, 1459, 1499, 1637, 1663, 1693, 1747, 1801, 1889, 1987, 2129, 2203, 2549, 2719, 3089, 3137, 3221, 3329, 3389, 3637, 3881, 4327, 4507, 4513, 4663, 4783
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
a(1)=5 because (7^2 - 5^2)/2 - 1 = 11 and (7^2 - 5^2)/2 + 1 = 13 (11, 13 are both primes),
a(2)=13 because (17^2 - 13^2)/2 - 1 = 59 and (17^2 - 13^2)/2 + 1 = 61,
a(3)=29 because (31^2 - 29^2)/2 - 1 = 59 and (31^2 - 29^2)/2 + 1 = 61, ...
|
|
MAPLE
|
ts_p3_1:=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 and isprime(b)=true) then ans := [ op(ans), ithprime(i) ]: fi od; RETURN(ans) end: ts_p3_1(2000);
|
|
MATHEMATICA
|
Transpose[Select[Partition[Prime[Range[1000]], 2, 1], AllTrue[(#[[2]]^2- #[[1]]^2)/2+ {1, -1}, PrimeQ]&]][[1]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jun 03 2015 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|