

A166504


Slime numbers: numbers which are the concatenation of primes, with "leading zeros" allowed.


6



2, 3, 5, 7, 11, 13, 17, 19, 22, 23, 25, 27, 29, 31, 32, 33, 35, 37, 41, 43, 47, 52, 53, 55, 57, 59, 61, 67, 71, 72, 73, 75, 77, 79, 83, 89, 97, 101, 103, 107, 109, 112, 113, 115, 117, 127, 131, 132, 133, 135, 137, 139, 149, 151, 157, 163, 167, 172, 173, 175, 177, 179
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

A number is in this sequence if and only if it is prime or of the form a(k)*10^m+a(n), where a(k), a(n) are in this sequence and 10^m >= a(n) (and from this follows that one among a(k), a(n) can be taken to be prime).
This contains A152242 as a subsequence, but also additional terms like e.g. 202 which can be split into two primes, 2 and 02 (= 2). Such a splitting, where some of the substrings contain leading zeros, is not allowed in A152242.
Terms not in A152242 are listed in A166505.


LINKS

Table of n, a(n) for n=1..62.
Henri Picciotto, Selected Integer Sequences


PROG

(PARI) is_A166504(n)={ isprime(n)  ((bittest(n, 0)  n%10==2) & for(i=1, #Str(n)1, isprime(n%10^i) & is_A166504(n\10^i) & return(1)))}
(PARI) is(n)=if(isprime(n), return(1)); if(n<202, return(isprime(n%10)&&isprime(n\10))); my(k=n%10, v); if(k==5k==2, return(if(n<6, 1, n\=10; has(n/10^valuation(n, 10))))); if(k%2==0, return(0)); v=digits(n); for(i=1, #v, if(isprime(n%10^i)&&is(n\10^i), return(1))); 0 \\ Charles R Greathouse IV, Apr 30 2013


CROSSREFS

Cf. A152242 (no leading zeros allowed).
Cf. A085823 (superslimes: all substrings are prime).  Henri Picciotto, Apr 01 2015
Sequence in context: A106317 A246281 A152242 * A095405 A242127 A242126
Adjacent sequences: A166501 A166502 A166503 * A166505 A166506 A166507


KEYWORD

nonn,base


AUTHOR

M. F. Hasler, Nov 02 2009


EXTENSIONS

Edited by Charles R Greathouse IV, Apr 23 2010
Name "Slime numbers", after Henri Picciotto, added by N. J. A. Sloane, Mar 25 2015


STATUS

approved



