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).

This page as a plain text file.
%I A075598 #11 Aug 29 2018 02:50:01
%S A075598 5,151,11519,2115193,121151939,21211519397,4212115193971,
%T A075598 342121151939719,43421211519397199,2434212115193971993,
%U A075598 224342121151939719937,122434212115193971993787,51224342121151939719937871,2512243421211519397199378719,325122434212115193971993787197,93251224342121151939719937871973
%N 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).
%H A075598 Robert Israel, <a href="/A075598/b075598.txt">Table of n, a(n) for n = 1..330</a>
%p A075598 f:= proc(n) local m,d,d1,v,x,y,y0,z,found;
%p A075598   m:= ilog10(n);
%p A075598   v:= infinity;
%p A075598   for d from 2 do
%p A075598     for d1 from 1 to d-1 do
%p A075598       found:= false;
%p A075598       for x from 10^(d1-1) to 10^d1-1 while not found do
%p A075598         if d-d1=1 then y0:= 1 else y0:= 10^(d-d1-1)+1 fi;
%p A075598         for y from y0 to 10^(d-d1)-1 by 2 do
%p A075598           z:= y+10^(d-d1)*n + 10^(d-d1+m+1)*x;
%p A075598           if isprime(z) then v:= min(v,z); found:= true; break fi
%p A075598       od od;
%p A075598     od;
%p A075598     if v < infinity then return v fi
%p A075598   od
%p A075598 end proc:
%p A075598 A[1]:= 5:
%p A075598 for n from 2 to 20 do
%p A075598   A[n]:= f(A[n-1])
%p A075598 od:
%p A075598 seq(A[n],n=1..20); # _Robert Israel_, Aug 28 2018
%Y A075598 Cf. A075595, A075596, A075597, A075599, A075600, A075601, A075602.
%K A075598 base,nonn
%O A075598 1,1
%A A075598 _Amarnath Murthy_, Sep 28 2002
%E A075598 More terms from _Sascha Kurz_, Jan 20 2003
%E A075598 Terms a(13) and beyond from _Robert Israel_, Aug 28 2018