OFFSET
1,1
COMMENTS
2*(prime(n)^2 - prime(n-1)^2) represents the integer coefficient of the difference in areas between the two circles passing through the origin with centers located at (prime(n), prime(n)) and (prime(n-1), prime(n-1)).
Among the first 200000 primes 2593 and 2609 are the only consecutive primes in this sequence.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
Prime(5) = 11, prime(4) = 7, 2*(11^2 - 7^2) = 12^2, so 11 is in the sequence.
Prime(559) = 4051, prime(558) = 4049, 2*(4051^2 - 4049^2) = 180^2, so 4051 is in the sequence.
MATHEMATICA
Select[Prime@ Range[2, 17000], IntegerQ@ Sqrt[2 (#^2 - NextPrime[#, -1]^2)] &] (* Giovanni Resta, Jun 06 2020 *)
PROG
(PARI) lista(nn) = {my(pp=2); forprime (p=3, nn, if (issquare(2*(p^2 - pp^2)), print1(p, ", ")); pp = p; ); } \\ Michel Marcus, Jun 25 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Jeff Brown, Jun 06 2020
EXTENSIONS
More terms from Giovanni Resta, Jun 06 2020
STATUS
approved