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.

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

Original entry on oeis.org

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
Offset: 1

Views

Author

M. F. Hasler, Nov 02 2009

Keywords

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.

Crossrefs

Cf. A152242 (no leading zeros allowed).
Cf. A085823 (super-slimes: all substrings are prime). - Henri Picciotto, Apr 01 2015

Programs

  • 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==5||k==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

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