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.

Showing 1-1 of 1 results.

A240725 Primes p such that p^2*q^2*r^2 + 12 and p^2*q^2*r^2 - 12 are primes where q and r are next two primes after p.

Original entry on oeis.org

23, 31, 43, 521, 1061, 2153, 3457, 4019, 4943, 5477, 6991, 7577, 8291, 8539, 10993, 11953, 14767, 17957, 18439, 26321, 40993, 41047, 53269, 57917, 71347, 79979, 80989, 88997, 91499, 92269, 94561, 108457, 109111, 112019, 117671, 121763, 133103, 140407, 147073
Offset: 1

Views

Author

K. D. Bajpai, Apr 11 2014

Keywords

Comments

In the expression prime(n)^2 * prime(n+1)^2 * prime(n+2)^2 +/- c, c = 12 is the smallest integer that yields a sequence of such primes. That means for c = 1...11 no such sequence with a large number of primes is obtained.

Examples

			23 is prime and appears in the sequence because 23^2 * 29^2 * 31^2 + 12 = 427538341 and 23^2 * 29^2 * 31^2 - 12 = 427538317 are both prime where 29 and 31 are the next two primes after 23.
31 is prime and appears in the sequence because 31^2 * 37^2 * 41^2 + 12 = 2211538741 and 31^2 * 37^2 * 41^2 - 12 = 2211538717 are both prime where 37 and 41 are the next two primes after 31.
		

Crossrefs

Programs

  • Maple
    KD := proc(n) local a, b, d; a:=ithprime(n)^2*ithprime(n+1)^2*ithprime(n+2)^2; b:=a+12; d:=a-12; if  isprime(b) and isprime(d) then RETURN (ithprime(n)); fi; end: seq(KD(n), n=1..20000);
  • Mathematica
    c=0;Do[If[PrimeQ[Prime[n]^2*Prime[n+1]^2*Prime[n+2]^2+12]&&PrimeQ[Prime[n]^2*Prime[n+1]^2*Prime[n+2]^2-12],c=c+1;Print[c," ", Prime[n]]], {n,1,1000000}];
    KD = {}; Do[p = Prime[n]; If[PrimeQ[Prime[n]^2*Prime[n + 1]^2*Prime[n + 2]^2 + 12] && PrimeQ[Prime[n]^2*Prime[n + 1]^2*Prime[n + 2]^2 - 12], AppendTo[KD, p]], {n, 10000}]; KD
Showing 1-1 of 1 results.