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.

A173472 Numbers k such that exactly one of prime(k)^2 - 2 and prime(k)^2 + 2 is prime.

Original entry on oeis.org

1, 3, 4, 6, 8, 10, 12, 14, 15, 18, 20, 24, 27, 28, 31, 32, 34, 40, 43, 47, 48, 51, 52, 55, 62, 65, 68, 72, 82, 86, 87, 91, 94, 99, 100, 104, 107, 111, 119, 123, 128, 129, 130, 132, 133, 134, 135, 139, 141, 150, 152, 170, 172, 177, 180, 182, 191, 200, 202, 209, 211, 214
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Feb 19 2010

Keywords

Comments

Essentially the same as A137291.

Examples

			a(1)=1 because prime(1)^2 - 2 = 2 is prime and prime(1)^2 + 2 = 6 is composite.
		

Crossrefs

Cf. A137291.

Programs

  • Maple
    isA173472 := proc(n) local p,pplus,pmin ; p := ithprime(n) ; pmin := isprime(p^2-2) ; pplus := isprime(p^2+2) ; if pmin <> pplus then return true; else return false; end if; end proc: for n from 1 to 300 do if isA173472(n) then printf("%d,",n) ; end if; end do ; # R. J. Mathar, Feb 21 2010

Extensions

More terms from R. J. Mathar, Feb 21 2010
Edited by Charles R Greathouse IV, Mar 24 2010