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-3 of 3 results.

A241486 Primes p such that p+4, p+444 and p+4444 are also prime.

Original entry on oeis.org

13, 19, 79, 103, 229, 307, 643, 853, 859, 937, 1087, 1213, 1297, 1423, 1567, 1609, 1867, 2347, 2389, 2473, 3163, 3463, 3919, 4003, 4153, 4783, 4969, 5077, 5347, 5413, 5479, 5647, 5689, 5857, 6733, 6907, 6967, 7933, 8269, 9277, 9337, 9463, 10687, 10729, 11083
Offset: 1

Views

Author

K. D. Bajpai, Apr 23 2014

Keywords

Comments

All the terms in the sequence are congruent to 1 mod 6.
The constants in the definition (4, 444 and 4444) are the concatenations of the digit 4.

Examples

			a(1) = 13 is a prime: 13+4 = 17, 13+444 = 457 and 13+4444 = 4457 are also prime.
a(2) = 19 is a prime: 19+4 = 23, 19+444 = 463 and 19+4444 = 4463 are also prime.
		

Crossrefs

Programs

  • Maple
    KD:= proc() local a,b,d,e; a:= ithprime(n); b:=a+4; d:=a+444; e:=a+4444;if isprime(b)and isprime(d)and isprime(e)then return (a): fi;  end: seq(KD(), n=1..5000);
  • Mathematica
    KD = {}; Do[p = Prime[n]; If[PrimeQ[p + 4] && PrimeQ[p + 444] && PrimeQ[p + 4444], AppendTo[KD, p]], {n, 5000}]; KD
    (* For the b-file*) c = 0; p = Prime[n]; Do[If[PrimeQ[p + 4] && PrimeQ[p + 444] && PrimeQ[p + 4444], c = c + 1; Print[c, "  ", p]], {n, 1, 3*10^6}];
  • PARI
    s=[]; forprime(p=2, 12000, if(isprime(p+4) && isprime(p+444) && isprime(p+4444), s=concat(s, p))); s \\ Colin Barker, Apr 25 2014

A241487 Primes p such that p+6, p+666 and p+6666 are also prime.

Original entry on oeis.org

7, 53, 67, 157, 191, 311, 331, 347, 353, 373, 443, 563, 571, 641, 821, 823, 857, 941, 1033, 1087, 1123, 1283, 1423, 1607, 1621, 1873, 1997, 2011, 2137, 2333, 2383, 2543, 2657, 2677, 2797, 2957, 3301, 3511, 3607, 3671, 3691, 3797, 3847, 4133, 5113, 5147, 5231
Offset: 1

Views

Author

K. D. Bajpai, Apr 23 2014

Keywords

Comments

The constants in the definition (6, 666 and 6666) are concatenations of the digit 6.

Examples

			a(2) = 53 is a prime: 53+6 = 59, 53+666 = 719 and 53+6666 = 6719 are also prime.
a(3) = 67 is a prime: 67+6 = 73, 67+666 = 733 and 67+6666 = 6733 are also prime.
		

Crossrefs

Programs

  • Maple
    KD:= proc() local a,b,d,e; a:= ithprime(n); b:=a+2;d:=a+222;e:=a+2222; if isprime(b)and isprime(d)and isprime(e)  then return (a) :fi; end: seq(KD(), n=1..5000);
  • Mathematica
    KD = {}; Do[p = Prime[n];If[PrimeQ[p + 6] && PrimeQ[p + 666] && PrimeQ[p + 6666],AppendTo[KD, p]], {n, 5000}]; KD
    (*For the b-file*) c = 0; p = Prime[n]; Do[If[PrimeQ[p + 6] && PrimeQ[p + 666] && PrimeQ[p + 6666], c = c + 1;Print[c, "  ", p]], {n, 1, 2*10^6}];
  • PARI
    s=[]; forprime(p=2, 6000, if(isprime(p+6) && isprime(p+666) && isprime(p+6666), s=concat(s, p))); s \\ Colin Barker, Apr 25 2014

A241488 Primes p such that p+8, p+888 and p+8888 are also prime.

Original entry on oeis.org

53, 263, 389, 431, 983, 1013, 1061, 1223, 1571, 1823, 2789, 3323, 3533, 3911, 4211, 5849, 6563, 6653, 7019, 7481, 8369, 8963, 9041, 9173, 9413, 9539, 9803, 10091, 10559, 10979, 12611, 12689, 12911, 13163, 13751, 13781, 14243, 14879, 15083, 16691, 17231, 17483
Offset: 1

Views

Author

K. D. Bajpai, Apr 23 2014

Keywords

Comments

All the terms in the sequence are congruent to 2 mod 3.
The constants in the definition (8, 888 and 8888) are the concatenation of digit 8.

Examples

			a(1) = 53 is a prime: 53+8 = 61, 53+888 = 941 and 53+8888 = 8941 are also prime.
a(2) = 263 is a prime: 263+8 = 271, 263+888 = 1151 and 263+8888 = 9151 are also prime.
		

Crossrefs

Programs

  • Maple
    KD:= proc() local a,b,d,e; a:= ithprime(n); b:=a+8;d:=a+888;e:=a+8888; if isprime(b)and isprime(d)and isprime(e)  then return (a) :fi; end: seq(KD(), n=1..5000);
  • Mathematica
    KD = {}; Do[p = Prime[n]; If[PrimeQ[p + 8] && PrimeQ[p + 888] && PrimeQ[p + 8888], AppendTo[KD, p]], {n, 5000}]; KD
    (*For the b-file*)  c = 0; p = Prime[n]; Do[If[PrimeQ[p + 8] && PrimeQ[p + 888] && PrimeQ[p + 8888], c = c + 1; Print[c, "  ", p]], {n, 1, 5*10^6}];
    Select[Prime[Range[2500]],AllTrue[#+{8,888,8888},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 31 2017 *)
  • PARI
    s=[]; forprime(p=2, 18000, if(isprime(p+8) && isprime(p+888) && isprime(p+8888), s=concat(s, p))); s \\ Colin Barker, Apr 25 2014
Showing 1-3 of 3 results.