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.

A330438 Numbers k such that k^2-2 and k^3-2 are prime.

Original entry on oeis.org

9, 15, 19, 27, 37, 121, 135, 145, 211, 217, 259, 265, 267, 279, 355, 357, 387, 391, 435, 489, 525, 561, 615, 621, 727, 951, 987, 1029, 1119, 1141, 1177, 1251, 1287, 1357, 1435, 1491, 1561, 1617, 1717, 1785, 1819, 1839, 1875, 1909, 1989, 2001, 2077, 2107, 2211
Offset: 1

Views

Author

K. D. Bajpai, Dec 14 2019

Keywords

Comments

Intersection of A028870 and A038599.

Examples

			a(1) = 9: 9^2 - 2 = 79; 9^3 - 2 = 727; both results are prime.
a(2) = 15: 15^2 - 2 = 223; 15^3 - 2 = 3373; both results are prime.
		

Crossrefs

Programs

  • Magma
    [n : n in [1 .. 100] | IsPrime (n^2 - 2) and IsPrime (n^3 - 2)];
  • Maple
    filter:= k -> isprime(k^2-2) and isprime(k^3-2):
    select(filter, [$2..10000]); # Robert Israel, Dec 24 2019
  • Mathematica
    Select[Range[10000], PrimeQ[#^3 - 2] && PrimeQ[#^2 - 2] &]