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.

A057877 a(n) = smallest n-digit prime in A057876.

This page as a plain text file.
%I A057877 #11 Jul 14 2018 02:48:31
%S A057877 23,113,1531,12239,111317,1111219,11119291,111111197,1111113173,
%T A057877 11111133017,111111189919,1111111411337,11111111161177,
%U A057877 111111111263311,1111111111149119,11111111111179913,111111111111118771,1111111111111751371,11111111111111111131,111111111111113129773,1111111111111111337111
%N A057877 a(n) = smallest n-digit prime in A057876.
%e A057877 1531 gives primes 53, 131 and 151 after dropping digits 1, 5 and 3.
%p A057877 filter:= proc(n) local L,d,Lp;
%p A057877   if not isprime(n) then return false fi;
%p A057877   L:= convert(n,base,10);
%p A057877   for d in convert(L,set) do
%p A057877     Lp:= subs(d=NULL,L);
%p A057877     if Lp=[] or Lp[-1] = 0 then return false fi;
%p A057877     if not isprime(add(Lp[i]*10^(i-1),i=1..nops(Lp))) then return false fi;
%p A057877   od;
%p A057877   true
%p A057877 end proc:
%p A057877 Res:= NULL:
%p A057877 for t from 1 to 21 do
%p A057877   for x from (10^(t+1)-1)/9 by 2 do
%p A057877     if filter(x) then Res:= Res, x; break fi
%p A057877   od
%p A057877 od:
%p A057877 Res; # _Robert Israel_, Jul 13 2018
%t A057877 Do[k = (10^n - 1)/9; While[d = IntegerDigits[k]; !PrimeQ[k] || !PrimeQ[ FromDigits[ DeleteCases[d, 0]]] || !PrimeQ[ FromDigits[ DeleteCases[d, 1]]] || !PrimeQ[ FromDigits[ DeleteCases[d, 2]]] || !PrimeQ[ FromDigits[ DeleteCases[d, 3]]] || !PrimeQ[ FromDigits[ DeleteCases[d, 4]]] || !PrimeQ[ FromDigits[ DeleteCases[d, 5]]] || !PrimeQ[ FromDigits[ DeleteCases[d, 6]]] || !PrimeQ[ FromDigits[ DeleteCases[d, 7]]] || !PrimeQ[ FromDigits[ DeleteCases[d, 8]]] || !PrimeQ[ FromDigits[ DeleteCases[d, 9]]], k++ ]; Print[k], {n, 2, 19}]
%Y A057877 Cf. A057876, A057877, A057878, A057879, A057880, A057881, A057882, A057883, A051362, A034302, A034303, A034304, A034305.
%K A057877 base,nonn
%O A057877 2,1
%A A057877 _Patrick De Geest_, Oct 15 2000
%E A057877 Extended by _Robert G. Wilson v_, Dec 17 2002
%E A057877 More terms from _Robert Israel_, Jul 13 2018