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.

A242905 a(n+1) is the smallest prime > a(n) such that the digits of a(n) are all (with multiplicity) contained in the digits of a(n+1), with a(1)=3.

This page as a plain text file.
%I A242905 #7 May 26 2014 10:34:44
%S A242905 3,13,31,103,1013,1031,1103,1301,3011,10103,10301,11003,13001,30011,
%T A242905 100103,103001,1000133,1000313,1001303,1003103,1010033,1013003,
%U A242905 1030031,1031003,1033001,1100303,1300031,1330001
%N A242905 a(n+1) is the smallest prime > a(n) such that the digits of a(n) are all (with multiplicity) contained in the digits of a(n+1), with a(1)=3.
%p A242905 with(numtheory):lst:={3}:nn:=250000:x0:=convert(3,base,10):n0:=nops(x0):
%p A242905   for n from 3 to nn do:
%p A242905      p:=ithprime(n):x:=convert(p,base,10):
%p A242905      x1:=x:n1:=nops(x):c:=0:
%p A242905         for i from 1 to n0 do:
%p A242905          ii:=0:
%p A242905            for j from 1 to n1 while(ii=0)do:
%p A242905              if x0[i]=x[j]
%p A242905              then
%p A242905              c:=c+1:x[j]:=99:ii:=1:
%p A242905              else
%p A242905              fi:
%p A242905            od:
%p A242905          od:
%p A242905           if c=n0
%p A242905           then
%p A242905           lst:=lst union {p}:n0:=n1:x0:=x1:
%p A242905           else
%p A242905           fi:
%p A242905     od:
%p A242905     print(lst):
%Y A242905 Cf. A242904, A242906, A242907.
%K A242905 nonn,base
%O A242905 1,1
%A A242905 _Michel Lagneau_, May 26 2014