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.

A236304 Primes p such that p+12, p+1234 and p+123456 are also prime.

Original entry on oeis.org

127, 907, 3037, 3457, 5737, 7057, 11047, 15427, 15667, 21517, 24697, 30307, 38287, 38317, 39607, 40177, 46477, 47797, 48787, 51157, 52177, 57667, 65587, 70627, 70867, 71887, 72997, 74857, 75277, 80317, 99817, 100447, 103657, 106747, 128437, 130087, 132157
Offset: 1

Views

Author

K. D. Bajpai, Apr 21 2014

Keywords

Comments

All the terms in the sequence are congruent to 1 mod 3.
The constants in the definition (12, 1234 and 123456) are the concatenation of digits 1,2,3,4,5 and 6.

Examples

			a(1) = 127 is a prime: 127+12 = 139, 127+1234 = 1361 and 127+123456 = 123583 are also prime.
a(2) = 907 is a prime: 907+12 = 919, 907+1234 = 2141 and 907+123456 = 124363 are also prime.
		

Crossrefs

Programs

  • Maple
    KD:= proc() local a,b,d,e; a:= ithprime(n); b:=a+12;d:=a+1234;e:=a+123456; if isprime(b)and isprime(d)and isprime(e)  then return (a) :fi; end: seq(KD(), n=1..15000);
  • Mathematica
    KD={}; Do[p=Prime[n]; If[PrimeQ[p+12]&&PrimeQ[p+1234]&&PrimeQ[p+123456], AppendTo[KD,p]], {n,15000}];KD
    c=0; p=Prime[n]; Do[If[PrimeQ[p+12]&&PrimeQ[p+1234]&&PrimeQ[p+123456], c=c+1; Print[c,"  ",p]],{n,1,5*10^6}];(*b-file*)
  • PARI
    s=[]; forprime(p=2, 140000, if(isprime(p+12) && isprime(p+1234) && isprime(p+123456), s=concat(s, p))); s \\ Colin Barker, Apr 22 2014