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.

A278697 Primes p such that every suffix of the base-5 representation of p is a prime.

Original entry on oeis.org

2, 3, 7, 13, 17, 23, 53, 67, 73, 103, 107, 113, 127, 257, 263, 317, 353, 503, 523, 607, 613, 1303, 1567, 1753, 1877, 2503, 3023, 6257, 6263, 6317, 6323, 6353, 6857, 6863, 7817, 8753, 9377, 12503, 12517, 12553, 12613, 12757, 12763, 12853, 13003, 31253, 31267, 31357, 31513, 31567
Offset: 1

Views

Author

Randy L. Ekl, Nov 26 2016

Keywords

Examples

			17=32_5 is in the sequence since it and its base-5 suffix (2_5=2) are primes.
113=423_5 is in the sequence since it and each of its base-5 suffixes (23_5=13 and 3_5=3) are prime.
		

Crossrefs

Cf. A033664 is in base 10.

Programs

  • Maple
    F[1]:= [2,3]:
    for m from 2 while nops(F[m-1]) < 100 do
      F[m]:= [op(F[m-1]),op(select(isprime, [seq(seq(i*5^
    (m-1)+x,x=F[m-1]),i=1..4)]))]
    od:
    F[m-1]; # Robert Israel, Jan 22 2020
  • PARI
    isok(n) = {if (isprime(n), pp = 5^logint(n, 5); while (isprime(n % pp) && (pp != 1), pp = pp/5); pp == 1;);} \\ Michel Marcus, Nov 26 2016