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.

A289867 Primes obtained from other primes by prefixing a 6.

Original entry on oeis.org

67, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 683, 6101, 6113, 6131, 6151, 6163, 6173, 6197, 6199, 6211, 6229, 6257, 6263, 6269, 6271, 6277, 6311, 6317, 6337, 6353, 6359, 6367, 6373, 6379, 6389, 6397, 6421, 6449, 6491, 6521, 6547, 6563
Offset: 1

Views

Author

Vincenzo Librandi, Jul 15 2017

Keywords

Examples

			613 is a term because it is a prime obtained by prefixing a 6 to the prime 13.
6101 is a term because it is a prime obtained by prefixing a 6 to the prime 101.
		

Crossrefs

Cf. similar sequences listed in A289866.

Programs

  • Magma
    [k: p in PrimesUpTo(800) | IsPrime(k) where k is Seqint(Intseq(p) cat [6])];
    
  • Maple
    p:= 0: A:= NULL:
    while p < 1000 do
      p:= nextprime(p);
      q:= 10^(ilog10(p)+1)*6+p;
      if isprime(q) then A:= A, q; fi
    od:
    A; # Robert Israel, Jul 17 2017
  • Mathematica
    Select[Table[FromDigits[Join[IntegerDigits[6], IntegerDigits[Prime[n]]]], {n, 110}], PrimeQ]
    Select[6*10^IntegerLength[#]+#&/@Prime[Range[150]],PrimeQ] (* Harvey P. Dale, Apr 03 2022 *)
  • PARI
    terms(n) = my(i=0); forprime(p=1, , my(s=eval(Str(6, p))); if(ispseudoprime(s), print1(s, ", "); i++); if(i==n, break))
    /* Print initial 50 terms as follows */
    terms(50) \\ Felix Fröhlich, Jul 15 2017