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.

A137796 Prime numbers p such that p + 12 and p - 12 are primes.

Original entry on oeis.org

17, 19, 29, 31, 41, 59, 71, 101, 139, 151, 179, 211, 239, 251, 269, 281, 409, 421, 431, 479, 491, 619, 631, 739, 809, 941, 1009, 1021, 1051, 1289, 1291, 1439, 1459, 1471, 1499, 1511, 1571, 1609, 1709, 1721, 1789, 1889, 1901, 1999, 2099, 2141, 2281, 2411
Offset: 1

Views

Author

Keywords

Examples

			17 + 12 = 29 (a prime), 17 - 12 = 5 (a prime);
19 + 12 = 31 (a prime), 19 - 12 = 7 (a prime).
		

Crossrefs

Cf. A092216, A046133. Note that this is different from A137873.

Programs

  • Maple
    isA092216 := proc(n) RETURN(isprime(n) and isprime(n-12) ) ; end: isA046133 := proc(n) RETURN(isprime(n) and isprime(n+12) ) ; end: isA137796 := proc(n) RETURN(isA092216(n) and isA046133(n)) ; end: for i from 1 to 400 do if isA137796(ithprime(i)) then printf("%d,",ithprime(i)) ; fi ; od: # R. J. Mathar, May 03 2008
  • Mathematica
    a=12; Select[Table[Prime[n],{n,10^3}], PrimeQ[ #-a] && PrimeQ[ #+a] &]
  • PARI
    lista(nn) = forprime(p=2, nn, if (isprime(p-12) && isprime(p+12), print1(p, ", "))); \\ Michel Marcus, Oct 04 2015

Formula

A092216 INTERSECT A046133. - R. J. Mathar, May 03 2008

Extensions

Corrected and extended by R. J. Mathar, May 03 2008