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.

A254754 Prime numbers such that, in base 10, all their proper prefixes and suffixes represent composites.

Original entry on oeis.org

89, 409, 449, 499, 809, 4049, 4549, 4649, 4909, 4969, 6299, 6469, 6869, 6899, 6949, 8009, 8039, 8069, 8209, 8609, 8669, 8699, 8849, 9049, 9209, 9649, 9949, 40009, 40099, 40609, 40639, 40699, 40849, 42209, 42649, 44249, 44699, 45949, 46049, 46099
Offset: 1

Views

Author

Stanislav Sykora, Feb 15 2015

Keywords

Comments

A proper prefix (or suffix) of a number m is one which is neither void, nor identical to m.
Alternative definition: Slice the decimal expansion of the prime number a(n) in any way into two nonempty parts; then both parts represent a composite number.
This sequence is a subset of A254750. Each member a(n) must start with one of the digits {4,6,8,9} and end with 9.
Every proper prefix of each member a(n) is a member of A202260, and every proper suffix is a member of A254755.
These numbers are rare and tend to become rarer with increasing n, but the sequence does not seem to terminate (for example, 4*10^28 + 9 is a member).

Examples

			7 is not a member because its expansion cannot be sliced in two.
The prime 4969 is a member because it is a prime and the slices (4, 969, 49, 69, 496, and 9) are all composites.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[5,5000]],AllTrue[Flatten[Table[FromDigits/@TakeDrop[IntegerDigits[#],n],{n,IntegerLength[ #]-1}]],CompositeQ]&] (* Harvey P. Dale, Sep 22 2024 *)
  • PARI
    isComposite(n) = (n>2)&&(!isprime(n));
    slicesIntoComposites(n,b=10) = {my(k=b);if(n0,if(!isComposite(n\k)||!isComposite(n%k),return(0););k*=b);return(1);}
    isPrimeSlicingIntoComposites(n,b=10) = isprime(n) && slicesIntoComposites(n,b);