A254754 Prime numbers such that, in base 10, all their proper prefixes and suffixes represent composites.
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
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.
Links
- Stanislav Sykora, Table of n, a(n) for n = 1..20000
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);
Comments