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.

This page as a plain text file.
%I A254754 #13 Sep 22 2024 15:01:03
%S A254754 89,409,449,499,809,4049,4549,4649,4909,4969,6299,6469,6869,6899,6949,
%T A254754 8009,8039,8069,8209,8609,8669,8699,8849,9049,9209,9649,9949,40009,
%U A254754 40099,40609,40639,40699,40849,42209,42649,44249,44699,45949,46049,46099
%N A254754 Prime numbers such that, in base 10, all their proper prefixes and suffixes represent composites.
%C A254754 A proper prefix (or suffix) of a number m is one which is neither void, nor identical to m.
%C A254754 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.
%C A254754 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.
%C A254754 Every proper prefix of each member a(n) is a member of A202260, and every proper suffix is a member of A254755.
%C A254754 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).
%H A254754 Stanislav Sykora, <a href="/A254754/b254754.txt">Table of n, a(n) for n = 1..20000</a>
%e A254754 7 is not a member because its expansion cannot be sliced in two.
%e A254754 The prime 4969 is a member because it is a prime and the slices (4, 969, 49, 69, 496, and 9) are all composites.
%t A254754 Select[Prime[Range[5,5000]],AllTrue[Flatten[Table[FromDigits/@TakeDrop[IntegerDigits[#],n],{n,IntegerLength[ #]-1}]],CompositeQ]&] (* _Harvey P. Dale_, Sep 22 2024 *)
%o A254754 (PARI) isComposite(n) = (n>2)&&(!isprime(n));
%o A254754 slicesIntoComposites(n,b=10) = {my(k=b);if(n<b,return(0););while(n\k>0,if(!isComposite(n\k)||!isComposite(n%k),return(0););k*=b);return(1);}
%o A254754 isPrimeSlicingIntoComposites(n,b=10) = isprime(n) && slicesIntoComposites(n,b);
%Y A254754 Cf. A202260, A254750, A254751, A254752, A254753, A254755.
%K A254754 nonn,base
%O A254754 1,1
%A A254754 _Stanislav Sykora_, Feb 15 2015