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.

A108809 Numbers n such that both n+(n-1)^2 and n+(n+1)^2 are primes.

Original entry on oeis.org

2, 3, 4, 7, 9, 15, 18, 25, 34, 55, 58, 63, 67, 100, 102, 139, 144, 148, 154, 162, 163, 168, 190, 195, 219, 232, 247, 267, 280, 289, 330, 349, 379, 384, 417, 427, 448, 454, 477, 568, 580, 643, 645, 669, 672, 727, 762, 793, 802, 813, 837, 847, 900, 975, 988, 993
Offset: 1

Views

Author

Walter Kehowski, Jul 04 2005

Keywords

Examples

			34 is in the sequence because 34 + 33^2 = 1123 and 34 + 35^2 = 1259 are both prime.
		

Crossrefs

Cf. A027861.
Intersection of A055494 and A094210. - Michel Marcus, Feb 08 2017

Programs

  • Maple
    L:=[]; for k from 1 to 1000 do if isprime(k+(k-1)^2) and isprime(k+(k+1)^2) then L:=[op(L),k] fi od;
  • Mathematica
    Select[Range@1000, PrimeQ[#^2 - # + 1] && PrimeQ[#^2 + 3 # + 1] &] (* Ivan Neretin, Feb 08 2017 *)
  • PARI
    isok(n) = isprime(n+(n-1)^2) && isprime(n+(n+1)^2); \\ Michel Marcus, Feb 08 2017