login
A309305
Sums of two primes whose difference is a nonzero square.
0
5, 10, 13, 18, 22, 30, 42, 46, 50, 58, 70, 78, 82, 85, 90, 98, 102, 106, 110, 114, 122, 126, 130, 138, 142, 150, 154, 158, 162, 170, 174, 178, 182, 190, 198, 202, 210, 218, 222, 229, 234, 238, 242, 246, 250, 258, 262, 270, 278, 282, 290, 294, 298, 302, 310
OFFSET
1,1
EXAMPLE
5 is in the sequence since 5 = 2 + 3 (both prime) and 3 - 2 = 1 is a nonzero square.
10 is in the sequence since 10 = 3 + 7 (both prime) and 7 - 3 = 4 is a nonzero square.
13 is in the sequence since 13 = 2 + 11 (both prime) and 11 - 2 = 9 is a nonzero square.
18 is in the sequence since 7 + 11 (both prime) and 11 - 7 = 4 is a nonzero square.
MATHEMATICA
Flatten[Table[If[Sum[(PrimePi[i] - PrimePi[i - 1]) (PrimePi[n - i] - PrimePi[n - i - 1]) (Floor[Sqrt[n - 2 i]] - Floor[Sqrt[n - 2 i - 1]]), {i, Floor[(n - 1)/2]}] > 0, n, {}], {n, 300}]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Jul 21 2019
STATUS
approved