OFFSET
1,1
COMMENTS
Only numbers > 1000 are considered, since all 3-digit primes are trivial members.
By definition, each term of the sequence with more than 4 digits is built up by an overlapped union of previous terms, i.e., a(59)=33739 has the two embedded previous terms a(14)=3373 and a(21)=3739.
The sequence is finite, the last term is 349199 (n=63). Proof of finiteness: Let p be a number with more than 6 digits. By the argument above, each 6-digit substring of p must be a previous term. The only 6-digit term is 349199. Thus, there is no number p with the desired property.
LINKS
Hieronymus Fischer, Table of n, a(n) for n = 1..63 (complete sequence).
EXAMPLE
a(1)=1277, since all substrings of length >= 3 are primes (127, 277, and 1277).
a(63)=349199, all substrings of length >= 3 (349, 491, 919, 199, 3491, 4919, 9199, 34919, 49199 and 349199) are primes.
CROSSREFS
KEYWORD
nonn,fini,base,full
AUTHOR
Hieronymus Fischer, Jun 08 2012
STATUS
approved