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.

A075598 a(1) = 5 and then the smallest prime that is obtained by placing digits on both sides of the previous term. Or smallest prime that encompasses a(n-1).

Original entry on oeis.org

5, 151, 11519, 2115193, 121151939, 21211519397, 4212115193971, 342121151939719, 43421211519397199, 2434212115193971993, 224342121151939719937, 122434212115193971993787, 51224342121151939719937871, 2512243421211519397199378719, 325122434212115193971993787197, 93251224342121151939719937871973
Offset: 1

Views

Author

Amarnath Murthy, Sep 28 2002

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local m,d,d1,v,x,y,y0,z,found;
      m:= ilog10(n);
      v:= infinity;
      for d from 2 do
        for d1 from 1 to d-1 do
          found:= false;
          for x from 10^(d1-1) to 10^d1-1 while not found do
            if d-d1=1 then y0:= 1 else y0:= 10^(d-d1-1)+1 fi;
            for y from y0 to 10^(d-d1)-1 by 2 do
              z:= y+10^(d-d1)*n + 10^(d-d1+m+1)*x;
              if isprime(z) then v:= min(v,z); found:= true; break fi
          od od;
        od;
        if v < infinity then return v fi
      od
    end proc:
    A[1]:= 5:
    for n from 2 to 20 do
      A[n]:= f(A[n-1])
    od:
    seq(A[n],n=1..20); # Robert Israel, Aug 28 2018

Extensions

More terms from Sascha Kurz, Jan 20 2003
Terms a(13) and beyond from Robert Israel, Aug 28 2018