cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A309305 Sums of two primes whose difference is a nonzero square.

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Jul 21 2019

Keywords

Examples

			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.
		

Crossrefs

Programs

  • 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}]]