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.

A254867 Numbers n such that prime(n) + n and prime(n) + n^2 are prime.

Original entry on oeis.org

1, 2, 4, 22, 66, 96, 106, 144, 180, 222, 324, 378, 466, 492, 604, 742, 760, 778, 784, 960, 984, 990, 994, 1050, 1150, 1162, 1186, 1248, 1302, 1308, 1356, 1360, 1380, 1744, 1830, 1866, 1870, 1956, 2052, 2070, 2112, 2182, 2212, 2380, 2470, 2556, 2586, 2638, 2676, 2760, 2766
Offset: 1

Views

Author

Zak Seidov, Feb 09 2015

Keywords

Examples

			a(4) = 22 = A064402(6): prime(22) = 79, 79 + {22, 22^2} = {101, 563} both prime.
		

Crossrefs

Subsequence of A064402. Cf. A000040, A014688, A061067, A061068.

Programs

  • Maple
    A254867:=n->`if`(isprime(ithprime(n)+n) and isprime(ithprime(n)+n^2), n, NULL): seq(A254867(n), n=1..10^4); # Wesley Ivan Hurt, Jan 16 2017
  • Mathematica
    Select[Range[1000], PrimeQ[Prime[#] + #] && PrimeQ[Prime[#] + #^2] &] (* Alonso del Arte, Feb 09 2015 *)
    Select[Range[3000],AllTrue[Prime[#]+{#,#^2},PrimeQ]&] (* Harvey P. Dale, Jan 17 2023 *)